Class: Aws::Telemetry::ContextManagerBase

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/telemetry/base.rb

Overview

Base for all ContextManager classes.

Direct Known Subclasses

NoOpContextManager, OTelContextManager

Instance Method Summary collapse

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.

Parameters:

  • context (Object)

    The new context

Returns:

  • (Object)

    token A token to be used when detaching

Raises:

  • (NotImplementedError)


162
163
164
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/base.rb', line 162

def attach(context)
  raise NotImplementedError
end

#currentContext

Returns current context.

Returns:

  • (Context)

Raises:

  • (NotImplementedError)


153
154
155
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/base.rb', line 153

def current
  raise NotImplementedError
end

#detach(token) ⇒ Boolean

Restore the previous Context associated with the current execution unit to the value it had before attaching a specified Context.

Parameters:

  • token (Object)

    The token provided by matching the call to attach

Returns:

  • (Boolean)

    True if the calls matched, False otherwise

Raises:

  • (NotImplementedError)


172
173
174
# File 'gems/aws-sdk-core/lib/aws-sdk-core/telemetry/base.rb', line 172

def detach(token)
  raise NotImplementedError
end