abstract struct OpenTelemetry::API::AbstractContext

Direct Known Subclasses

Defined in:

api/abstract_context.cr
api/context/abstract_key.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(entries : ContextContainer) #

def self.new(entries) #

def self.new #

Class Method Detail

def self.[](key) #

def self.[]=(key, value) #

def self.[]?(key) #

def self.attach(context : Context) #

def self.attach(entries) #

def self.clear #

def self.create_key(name) #

def self.create_key #

def self.current #

def self.detach(token) #

Restores the previous Context associated with the current Fiber. The supplied token is used to check if the call to detach is balanced with a corresponding attach call. A warning is logged if the calls are unbalanced.


def self.set_value(key, value) #

def self.stack #

def self.value(key) #

def self.value?(key) #

def self.with(key, values) #

Execute a block in a new context with key set to value. Restores the previous context after the block executes.


def self.with(context : Context) #

Executes a block with ctx as the current context. It restores the previous context upon exiting.


def self.with(values) #

@param [String] key The lookup key @param [Hash] values Will be merged with values of the current context and returned in a new context @param [Callable] Block to execute in a new context @yield [context, values] Yields the newly created context and values to the block


Instance Method Detail

abstract def [](key) #

abstract def []=(key, value) #

abstract def []?(key) #

abstract def entries #

abstract def merge(other_entries) #

abstract def object_id #

This is assumed to be implemented as a getter with a default value of CSUUID.unique.


abstract def set_value(key, value) #

abstract def value(key) #

abstract def value?(key) #