class Aws::Telemetry::OTelContextManager
OpenTelemetry-based {ContextManagerBase}, manages context and used to return the current context within a trace.
Public Instance Methods
attach(context)
click to toggle source
Associates a Context with the caller’s current execution unit. Returns a token to be used with the matching call to detach.
@param [Context] context The new context @return [Object] token A token to be used when detaching
# File lib/aws-sdk-core/telemetry/otel.rb, line 220 def attach(context) OpenTelemetry::Context.attach(context) end
current()
click to toggle source
Returns current context.
@return [Context]
# File lib/aws-sdk-core/telemetry/otel.rb, line 211 def current OpenTelemetry::Context.current end
detach(token)
click to toggle source
Restore the previous Context associated with the current execution unit to the value it had before attaching a specified Context.
@param [Object] token The token provided by matching the call to attach @return [Boolean] ‘True` if the calls matched, `False` otherwise
# File lib/aws-sdk-core/telemetry/otel.rb, line 230 def detach(token) OpenTelemetry::Context.detach(token) end