Custom Exporter and JavaAgent #6108
Unanswered
jonbranham
asked this question in
Q&A
Replies: 2 comments 2 replies
-
hi @jonbranham! check out https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/examples/extension |
Beta Was this translation helpful? Give feedback.
2 replies
-
Moving this to the instrumentation project.. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm a bit confused about how to combine the functionality of the javaagent auto-instrumentation w/ a custom exporter created using auto-configuration and the spi hooks.
Without the JavaAgent and using a normal classpath of dependencies for my exporter configured through Gradle, I'm able to activate the exporter through system property -Dotel.traces.exporter=abc. The ABCSpanExporterProvider configures it using a few additional system properties that fall under the otel.traces.exporter.abc prefix. This seems to all take place lazily upon first reference to GlobalOpenTelemetry.get().
I'd like to now combine this with auto-instrumentation as I have some messaging integrations like amqp/rabbitmq (not using Spring based APIs) and figured the javaagent would be the best fit. When I enable the javaagent and specify it in vmargs of IntelliJ, the first issue I encountered was that it did not recognize my custom exporter named "abc". I then tried experimenting with otel.javaagent.extensions=/abc-exporter.jar and this got a little bit further, however some of the dependencies that this exporter jar used we unable to be loaded.
Does this custom exporter need to be packaged in a certain way with all transitive dependencies? Or is a directory supported in which the exporter and transitive dependencies can be placed?
Beta Was this translation helpful? Give feedback.
All reactions