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.Factory for creatingContextSnapshot
objects and restoringThreadLocal
values using a context object for which aContextAccessor
exists in theContextRegistry
.Builder forContextSnapshotFactory
instances.Contract to assist with setting and clearing aThreadLocal
.