Class: Aws::Telemetry::OTelContextManager
- Inherits:
- 
      ContextManagerBase
      
        - Object
- ContextManagerBase
- Aws::Telemetry::OTelContextManager
 
- Defined in:
- lib/aws-sdk-core/telemetry/otel.rb
Overview
OpenTelemetry-based ContextManagerBase, manages context and used to return the current context within a trace.
Instance Method Summary collapse
- 
  
    
      #attach(context)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Associates a Context with the caller’s current execution unit. 
- 
  
    
      #current  ⇒ Context 
    
    
  
  
  
  
  
  
  
  
  
    Returns current context. 
- 
  
    
      #detach(token)  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    Restore the previous Context associated with the current execution unit to the value it had before attaching a specified Context. 
Instance Method Details
#attach(context) ⇒ Object
Associates a Context with the caller’s current execution unit. Returns a token to be used with the matching call to detach.
| 220 221 222 | # File 'lib/aws-sdk-core/telemetry/otel.rb', line 220 def attach(context) OpenTelemetry::Context.attach(context) end | 
#current ⇒ Context
Returns current context.
| 211 212 213 | # File 'lib/aws-sdk-core/telemetry/otel.rb', line 211 def current OpenTelemetry::Context.current end | 
#detach(token) ⇒ Boolean
Restore the previous Context associated with the current execution unit to the value it had before attaching a specified Context.
| 230 231 232 | # File 'lib/aws-sdk-core/telemetry/otel.rb', line 230 def detach(token) OpenTelemetry::Context.detach(token) end |