Package io.micrometer.context
@NonNullApi
@NonNullFields
package io.micrometer.context
This package contains abstractions and implementations for context propagation.
ThreadLocalAccessor
andContextAccessor
allow applications and frameworks to plug in support forThreadLocal
and other Map-like types of context such as the Project Reactor Contexts.ContextRegistry
provides a static instance with global access to all known accessors that should be registered on startup.ContextSnapshot
uses theContextRegistry
and is used to capture context values, and then propagate them from one type of context to another or from one thread to another.
-
ClassDescriptionContextAccessor<READ,
WRITE> ContextExecutorService<EXECUTOR extends ExecutorService>Wraps anExecutorService
in order to capture context viaContextSnapshot
when a task is submitted, and propagate context to the task when it is executed.Registry that provides access to, instances ofContextAccessor
andThreadLocalAccessor
.Wraps aScheduledExecutorService
in order to capture context viaContextSnapshot
when a task is submitted, and propagate context to the task when it is executed.Holds values extracted fromThreadLocal
and other types of context and exposes methods to propagate those values.An object to use to resetThreadLocal
values at the end of a context scope.Contract to assist with access to aThreadLocal
including the ability to get, set, and reset it.