opentelemetry.correlationcontext package¶
Module contents¶
-
opentelemetry.correlationcontext.
get_correlations
(context=None)[source]¶ Returns the name/value pairs in the CorrelationContext
- Parameters
context (
Optional
[Context
]) – The Context to use. If not set, uses current Context- Return type
Dict
[str
,object
]- Returns
Name/value pairs in the CorrelationContext
-
opentelemetry.correlationcontext.
get_correlation
(name, context=None)[source]¶ Provides access to the value for a name/value pair in the CorrelationContext
- Parameters
name (
str
) – The name of the value to retrievecontext (
Optional
[Context
]) – The Context to use. If not set, uses current Context
- Return type
Optional
[object
]- Returns
The value associated with the given name, or null if the given name is not present.
-
opentelemetry.correlationcontext.
set_correlation
(name, value, context=None)[source]¶ Sets a value in the CorrelationContext