-
Notifications
You must be signed in to change notification settings - Fork 878
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix kotlin coroutine context propagation (#7879)
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`](https://github.com/open-telemetry/opentelemetry-java/blob/main/extensions/kotlin/src/main/java/io/opentelemetry/extension/kotlin/KotlinContextElement.java) and user added `ThreadContextElement` gets reversed. If user added `ThreadContextElement` changes opentelemetry context then these changes will get overwritten by `KotlinContextElement`.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters