Describe the bug
JdkHttpSender.send() does not wrap its HTTP call in InstrumentationUtil.suppressInstrumentation(...), so when the OpenTelemetry Java agent is attached and instruments the JDK HttpClient, the exporter's own OTLP requests are recorded as CLIENT spans.
Steps to reproduce
Attach the Java agent to an application, configure an OTLP HTTP exporter backed by the JDK sender (opentelemetry-exporter-sender-jdk on the classpath instead of the okhttp sender), and export any signal.
What did you expect to see?
No spans for exporter requests. OkHttpHttpSender.send() (exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/OkHttpHttpSender.java line 173), the other HttpSender implementation, already suppresses them.
What did you see instead?
A CLIENT span per export request. JdkHttpSender.send() (exporters/sender/jdk/src/main/java/io/opentelemetry/exporter/sender/jdk/internal/JdkHttpSender.java line 168) submits the request with no suppression.
What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-sender-jdk
Version: main @ 3a9fdc6 (also present in 1.65.0)
How did you reference these artifacts? Built from source.
Environment
Compiler: Temurin 21
OS: N/A
Additional context
Suppression was introduced for the okhttp sender in #5918. Follow-ups covered the zipkin (#5967) and jaeger (#5969) exporters, but not the JDK sender.
Describe the bug
JdkHttpSender.send()does not wrap its HTTP call inInstrumentationUtil.suppressInstrumentation(...), so when the OpenTelemetry Java agent is attached and instruments the JDKHttpClient, the exporter's own OTLP requests are recorded as CLIENT spans.Steps to reproduce
Attach the Java agent to an application, configure an OTLP HTTP exporter backed by the JDK sender (
opentelemetry-exporter-sender-jdkon the classpath instead of the okhttp sender), and export any signal.What did you expect to see?
No spans for exporter requests.
OkHttpHttpSender.send()(exporters/sender/okhttp/src/main/java/io/opentelemetry/exporter/sender/okhttp/internal/OkHttpHttpSender.javaline 173), the otherHttpSenderimplementation, already suppresses them.What did you see instead?
A CLIENT span per export request.
JdkHttpSender.send()(exporters/sender/jdk/src/main/java/io/opentelemetry/exporter/sender/jdk/internal/JdkHttpSender.javaline 168) submits the request with no suppression.What version and what artifacts are you using?
Artifacts: opentelemetry-exporter-sender-jdk
Version: main @ 3a9fdc6 (also present in 1.65.0)
How did you reference these artifacts? Built from source.
Environment
Compiler: Temurin 21
OS: N/A
Additional context
Suppression was introduced for the okhttp sender in #5918. Follow-ups covered the zipkin (#5967) and jaeger (#5969) exporters, but not the JDK sender.