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