Fork me on GitHub
#clj-otel
<
2022-05-06
>
frank20:05:57

@steffan do you need to do anything special to use the java instrumentation agent with an uberjar? I've gotten the agent to work using -javaagent:opentelemetry-javaagent.jar in my deps.edn, but I'm not having any success with my uberjar (`java -jar myjar.jar -javaagent:opentelemetry-javaagent.jar`) Any ideas?

frank20:05:32

ah, I think my -javaagent flag was just in the wrong position picard-facepalm

steffan18:05:04

Yes, the correct incantation of the java command when using the instrumentation agent with an uberjar is like this:

java -javaagent:opentelemetry-javaagent.jar             \
     -Dotel.resource.attributes=service.name=my-service \
     -Dotel.traces.exporter=jaeger                      \
     -Dotel.metrics.exporter=none                       \
     -jar my-service-1.0.jar