-
Hi! I'm trying to implement a small
Now, my problem with this is that I never get a Is there any way around this for now? Or would it make sense to wrap the
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Adding some details here, it seems that the code works for span instances created by the java agent but it does not for spans created programatically in the code, in my case it's something like :
I guess it makes sense because spans created by the agent do not need to be wrapped. |
Beta Was this translation helpful? Give feedback.
-
My guess is that is what is causing the issue. Java agent and spring starter both create their own |
Beta Was this translation helpful? Give feedback.
-
you shouldn't really need these. Add
Agent and application are isolated from each other. The |
Beta Was this translation helpful? Give feedback.
My guess is that is what is causing the issue. Java agent and spring starter both create their own
OpenTelemetry
instances. My guess is that your span processor is added to the one created by the spring starter. To allow allow agent and manual instrumentation to coexist agent instruments the opentelemetry api that is used in the application. I guess you end up with a weird situation where span is create by the opentelemetry from the spring starter but is stored in the context that is managed by the agent. Imo the best way around this would be choose whether you want to use the spring starter or the agent, it doesn't …