-
Hi 👋 I currently use the java agent in a legacy scenario: Tomcat9, where two spring boot 2.7 apps are deployed. Pushing traces via oltp to the otel collector, and then showing them in jaeger. All is somehow fine, but: I am not able to distinguish the services from the respective war files, which somehow makes sense, because it works at the JVM level, so for the agent it "looks" like one app with one service name. I tried to add the opentelemetry spring boot starter, and added the respective service names in the spring config and removed it from the agent, but then only (not at my computer anymore, but it was something around the lines of) unknown_java is shown in jaeger and only 1 span appears (expected: more, in my scenario 6). If anyone has a hint on how to set this up the right way, if it is even possible, this would be nice. I know I could add an extra resource attribute using an aspect and manual instrumentation, but I thought before doing that I'd ask here if there actually is a way to achieve this OOTB - at best with nothing but the agent applied. If needed, I could provide a small reproducer tomorrow (CET timezone) Greetings, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is currently not possible using the agent. Resource is per jvm, it is the same for all trace. While not convenient you should be able identify traces by looking at the |
Beta Was this translation helpful? Give feedback.
This is currently not possible using the agent. Resource is per jvm, it is the same for all trace. While not convenient you should be able identify traces by looking at the
url.full
attribute on theSERVER
span. If needed you could add a custom attribute on the root span, or perhaps even all spans, that could be used to identify the application the trace is from.