-
Notifications
You must be signed in to change notification settings - Fork 49
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
SpanId, traceId is lost when a coroutine is resumed on a different thread #243
Comments
Might be related: #174 |
Closing in favour of #174 |
@marcingrzejszczak Hi, I'm trying to start coroutine from GatewayFilter. The tracer works fine till I enter into this flat map " return super.writeWith(fluxBody.buffer().flatMap { dataBuffers: List ->..." @component
} |
We are trying to migrate our services (kotlin/coroutines/webflux/spring) to Spring Boot 3. Unfortunately, we cannot force tracing to work correctly on our setup. It looks like the span context is lost when a coroutine is resumed on a different thread.
Environment
Spring, kotlin, coroutines
A tried also to upgrade micrometer, otel, reactor dependencies to the latest snapshots but it doesn't help.
To Reproduce
I've created the sample project to demonstrate behavior:
https://github.com/andrejczyn/context-propagation-bug/blob/main/src/main/kotlin/com/andrejczyn/DemoApplication.kt
But generally when we call the endpoint:
we'll see that in second log the trace id has "0000..." trace, spandId:
Is there a chance that trace/span id will be propagated correctly for the coroutines?
The text was updated successfully, but these errors were encountered: