The OpenTelemetry project is trying to standardize...
# server
g
The OpenTelemetry project is trying to standardize on a context propagation mechanism - and I've found https://github.com/Kotlin/kotlinx.coroutines/issues/284 and would like to know more about it
e
What exactly you’d like to know?
g
How can OpenTelemetry use the coroutine context to propagate information (the active span context in this case)?
Ideally this could be done in a way that does not introduce any direct dependency to kotlin
in go, this is possible, because there is a standard for this: https://golang.org/pkg/context/
@elizarov
e
The way it is done with all the other thread-based context propagation mechanism (like logging) is this: • There is some thread-local-based context mechanim that is implemented in the library. The best is that when the context is immutable (like in GRPC) and can be updated only explictly. • There is a separate “coroutines integration module” that depends on
kotlinx.coroutines
and provides an intergration element for coroutines context.
g
great - just checked out the repo I found the MDC propagation you mentioned but not the GRPC module - is this external?
e
We don't have GRPC module. Maybe there is 3rd party one. IDK.
g
ok
e
It does not have to be in
kotlinx.coroutines
. We only maintain integration modules for very popular and widely-used libraries, trying to stay away from domain-specific ones.
g
makes sense - we're trying to establish a jvm standard 😎