opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

OTLP exporters should load Compressor using the class loader configured using `setServiceClassLoader`

Open jack-berg opened this issue 9 months ago • 3 comments

I guess we could consider dropping the separate class loader for extensions. @trask wdyt?

if we can solve with #7150 that sounds ideal 👍

There is the same issue with https://github.com/open-telemetry/opentelemetry-java/blob/8efade69a16f86164d52a9b9699620fc254ce772/exporters/common/src/main/java/io/opentelemetry/exporter/internal/compression/CompressorUtil.java#L51 An alternative would be to use context class loader. Currently we don't set the context loader in the agent, but we used to. Can't recall why we had to stop setting it.

Originally posted by @laurit in https://github.com/open-telemetry/opentelemetry-java/discussions/7164#discussioncomment-12417409

jack-berg avatar Mar 06 '25 18:03 jack-berg

@jack-berg Can I work on this?

vasantteja avatar Mar 31 '25 13:03 vasantteja

Sure!

jack-berg avatar Mar 31 '25 21:03 jack-berg

@jack-berg In your proposal you suggested bringing SpiHelper to opentelemetry-sdk-common. I really liked this idea. Would it be okay for me to proceed with making this change and use it in CompressionUtil for loading the Compressor?

vasantteja avatar May 16 '25 02:05 vasantteja

This issue is resolved. Can we close this?

@jkwatson @jack-berg

vasantteja avatar Sep 13 '25 18:09 vasantteja

This issue is resolved. Can we close this?

@jkwatson @jack-berg

Do you know what PR resolved it? It would be good to reference it when closing, for future reference.

jkwatson avatar Sep 15 '25 17:09 jkwatson

This issue is resolved. Can we close this? @jkwatson @jack-berg

Do you know what PR resolved it? It would be good to reference it when closing, for future reference.

@jkwatson This was resolved in this PR.

vasantteja avatar Sep 16 '25 22:09 vasantteja