Class ContextStorageBridge
java.lang.Object
io.grpc.Context.Storage
io.opentelemetry.instrumentation.grpc.v1_6.internal.ContextStorageBridge
public final class ContextStorageBridge
extends io.grpc.Context.Storage
Context.Storage override which uses OpenTelemetry context as the backing store. Both gRPC
and OpenTelemetry contexts refer to each other to ensure that both OTel context propagation
mechanisms and gRPC context propagation mechanisms can be used interchangeably.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Constructor Summary
ConstructorsConstructorDescriptionContextStorageBridge(boolean propagateGrpcDeadline) ContextStorageBridge(io.grpc.Context.Storage originalStorage) -
Method Summary
Methods inherited from class io.grpc.Context.Storage
attach
-
Constructor Details
-
ContextStorageBridge
public ContextStorageBridge(boolean propagateGrpcDeadline) -
ContextStorageBridge
public ContextStorageBridge(io.grpc.Context.Storage originalStorage)
-
-
Method Details
-
doAttach
public io.grpc.Context doAttach(io.grpc.Context toAttach) - Overrides:
doAttachin classio.grpc.Context.Storage
-
detach
public void detach(io.grpc.Context toDetach, io.grpc.Context toRestore) - Specified by:
detachin classio.grpc.Context.Storage
-
current
public io.grpc.Context current()- Specified by:
currentin classio.grpc.Context.Storage
-