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

Fix kotlin coroutine context propagation #7879

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Feb 22, 2023

Resolves #7837
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1 adds a second newCoroutineContext that we shouldn't instrument. When we instrument it the order of KotlinContextElement and user added ThreadContextElement gets reversed. If user added ThreadContextElement changes opentelemetry context then these changes will get overwritten by KotlinContextElement.

@laurit laurit requested a review from a team February 22, 2023 18:25
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@laurit laurit merged commit cbc616c into open-telemetry:main Feb 24, 2023
@laurit laurit deleted the kotlin-coroutine branch February 24, 2023 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kotlin gRPC conflict with OpenTelemetry Kotlin/gRPC instrumentation
3 participants