-
Notifications
You must be signed in to change notification settings - Fork 791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support tracing the ClickHouse Java HTTP client #11660
Support tracing the ClickHouse Java HTTP client #11660
Conversation
instrumentation/clickhouse/clickhouse-client/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
instrumentation/clickhouse/clickhouse-client/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
...n/java/io/opentelemetry/javaagent/instrumentation/clickhouse/ClickHouseAttributesGetter.java
Outdated
Show resolved
Hide resolved
...n/java/io/opentelemetry/javaagent/instrumentation/clickhouse/ClickHouseAttributesGetter.java
Outdated
Show resolved
Hide resolved
...a/io/opentelemetry/javaagent/instrumentation/clickhouse/ClickHouseClientInstrumentation.java
Outdated
Show resolved
Hide resolved
…ference to internal utility class, add call depth checking
instrumentation/clickhouse/clickhouse-client/javaagent/build.gradle.kts
Outdated
Show resolved
Hide resolved
...a/io/opentelemetry/javaagent/instrumentation/clickhouse/ClickHouseClientInstrumentation.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public List<TypeInstrumentation> typeInstrumentations() { | ||
return Collections.singletonList(new ClickHouseClientInstrumentation()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest to use static import here.
public class ClickHouseInstrumentationModule extends InstrumentationModule { | ||
|
||
public ClickHouseInstrumentationModule() { | ||
super("clickhouse", "clickhouse-client"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to previous convention, the module should be named to clickhouse-client-0.5
. Please pay attention to modify other places together.
settings.gradle.kts
Outdated
@@ -204,6 +204,7 @@ include(":instrumentation:cassandra:cassandra-4.4:library") | |||
include(":instrumentation:cassandra:cassandra-4.4:testing") | |||
include(":instrumentation:cassandra:cassandra-4-common:testing") | |||
include(":instrumentation:cdi-testing") | |||
include(":instrumentation:clickhouse:clickhouse-client:javaagent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a module, according to convention, please remove extra clickhouse
directory. use clickhouse-client-0.5
directly.
Contributes to #11562
Instruments v1 of the clickhouse-client (https://github.com/ClickHouse/clickhouse-java/tree/main/clickhouse-client)
A few notes:
The tests cover all the same scenarios, but I also created a repo to experiment with the tracing and visualize with jaeger and all seems to work as expected:
https://github.com/jaydeluca/clickhouse-tracing
Example Async query (
execute
)Example error: