Skip to content

How to get a ReadableSpan in a SpanProcessor? #11204

Closed Answered by laurit
jebeaudet asked this question in Q&A
Discussion options

You must be logged in to vote

I'm using the javaagent in my case, alongside the spring-boot-starter.

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 …

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jebeaudet
Comment options

@jebeaudet
Comment options

Answer selected by jebeaudet
Comment options

You must be logged in to vote
3 replies
@jebeaudet
Comment options

@laurit
Comment options

@jebeaudet
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants