experiments.tracing#
- class SpanModifier(resource: Resource)#
Bases:
object
A class that modifies spans with the specified resource attributes.
- modify_resource(span: ReadableSpan) None #
Takes a span and merges in the resource attributes specified in the constructor.
- Parameters:
span – ReadableSpan: the span to modify
- capture_spans(resource: Resource) Iterator[SpanModifier] #
A context manager that captures spans and modifies them with the specified resources.
- Parameters:
resource – Resource: The resource to merge into the spans created within the context.
- Returns:
Iterator[SpanModifier]: The span modifier that is active within the context.
- Return type:
modifier
- override_span(init: Callable[[...], None], span: ReadableSpan, args: Any, kwargs: Any) None #