PropagationToken


Known direct subclasses
PlatformThreadContextElement

We use the PlatformThreadContextElement construct to know when a coroutine has suspended, and about to resume on a Thread.

PropagationUnsupportedToken

The PropagationToken instance that should be returned when context propagation is unsupported by the underlying Tracer.


A token representing state carried forward for context propagation.

This interface is only useful for libraries that want to bring their own implementation of context propagation.

Summary

Public functions

contextElementOrNull

@DelicateTracingApi
fun contextElementOrNull(): CoroutineContext.Element?
Returns
CoroutineContext.Element?

a CoroutineContext.Element that needs to be installed in the kotlinx.coroutines.currentCoroutineContext prior to dispatching the suspending block of code being traced; if the token is being used in a suspending context.