Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot WebFlux + open-telemetry java agent, use Baggage and makeCurrent() in Filter, traceId is duplicated for many times. #12089

Closed
giantoneday opened this issue Aug 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@giantoneday
Copy link

giantoneday commented Aug 22, 2024

Hi,
I use Spring Boot WebFlux + open-telemetry java agent, and add Baggage to the Context, but I found that if I add baggage.storeInContext(Context.current()).makeCurrent() on Filter,

  1. Call a normal block http api, everything is fine.
  2. Call a flux http api, each traceId is duplicated for many times.
  3. If I don't add baggage to Context and don't makeCurrent(), then flux api is also fine.

My test project is here: flux-open-telemetry.zip

And please read the README to reproduce my issue.
Could you please show me how to fix this problem? Because it's important for me.

some similar issues reported by others:

  1. optl-instrumentation with spring-webflux generate duplicated traceId #8125
  2. Many different requests with a same traceId, seems a bug? #3168
  3. Duplicate Trace ID opentelemetry-java#1531

Thanks.

@giantoneday giantoneday added the bug Something isn't working label Aug 22, 2024
@giantoneday
Copy link
Author

reproduce project: Uploading flux-open-telemetry.zip…

@jkwatson
Copy link
Contributor

moving to the instrumentation repo

@jkwatson jkwatson transferred this issue from open-telemetry/opentelemetry-java Aug 23, 2024
@giantoneday giantoneday changed the title Spring Boot WebFlux + open-telemetry java agent, use Baggage, traceId is duplicated for many times. Spring Boot WebFlux + open-telemetry java agent, use Baggage and makeCurrent() in Filter, traceId is duplicated for many times. Aug 23, 2024
@laurit
Copy link
Contributor

laurit commented Aug 23, 2024

Duplicate of #12085

@laurit laurit marked this as a duplicate of #12085 Aug 23, 2024
@laurit laurit closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants