Class OtelCapturedContextProvider
java.lang.Object
io.servicetalk.opentelemetry.asynccontext.OtelCapturedContextProvider
- All Implemented Interfaces:
CapturedContextProvider
A
CapturedContextProvider
that properly captures and restores the Open Telemetry Context
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaptureContext
(CapturedContext underlying) Capture a reference to existing context in preparation for an asynchronous boundary jump.captureContextCopy
(CapturedContext underlying) Capture a copy of existing context in preparation for an asynchronous boundary jump.
-
Constructor Details
-
OtelCapturedContextProvider
public OtelCapturedContextProvider()Creates a new instance.
-
-
Method Details
-
captureContext
Description copied from interface:CapturedContextProvider
Capture a reference to existing context in preparation for an asynchronous boundary jump.- Specified by:
captureContext
in interfaceCapturedContextProvider
- Parameters:
underlying
- additional context that must be utilized as part of the returnedCapturedContext
, usually wrapped as described above.- Returns:
- the wrapped
CapturedContext
.
-
captureContextCopy
Description copied from interface:CapturedContextProvider
Capture a copy of existing context in preparation for an asynchronous boundary jump.- Specified by:
captureContextCopy
in interfaceCapturedContextProvider
- Parameters:
underlying
- additional context that must be utilized as part of the returnedCapturedContext
, usually wrapped as described above.- Returns:
- the wrapped
CapturedContext
.
-