struct OpenTelemetry::Context

Defined in:

context.cr
context/key.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(entries : ContextContainer) #

[View source]
def self.new(entries) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.[](key) #

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

[View source]
def self.[]?(key) #

[View source]
def self.attach(context : Context) #

[View source]
def self.attach(entries) #

[View source]
def self.attach(context : Context, &) #

[View source]
def self.attach(entries, &) #

[View source]
def self.clear #

[View source]
def self.create_key(name) #

[View source]
def self.create_key #

[View source]
def self.current #

[View source]
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.


[View source]
def self.set_value(key, value) #

[View source]
def self.stack #

[View source]
def self.value(key) #

[View source]
def self.value?(key) #

[View source]
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.


[View source]
def self.with(context : Context, &) #

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


[View source]
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


[View source]

Instance Method Detail

def [](key) #

[View source]
def []=(key, value) #

[View source]
def []?(key) #

[View source]
def entries : SplayTreeMap(String, String) #

[View source]
def merge(other_entries) #

[View source]
def object_id : CSUUID #
Description copied from struct OpenTelemetry::API::AbstractContext

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


[View source]
def set_value(key, value) #

[View source]
def value(key) #

[View source]
def value?(key) #

[View source]