clj-otel

frank 2022-05-06T20:28:57.594839Z

@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?

steffan 2022-05-07T18:40:04.282499Z

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

frank 2022-05-06T20:32:32.313359Z

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