Noop Tracer¶
-
class
opencensus.trace.tracers.noop_tracer.
NoopTracer
[source]¶ Bases:
opencensus.trace.tracers.base.Tracer
No-op implementation of the
Tracer
interface, all methods are no-ops. Should be used when tracing is not enabled or not sampled.-
add_attribute_to_current_span
(attribute_key, attribute_value)[source]¶ Add attribute to current span.
- Parameters
attribute_key (str) -- Attribute key.
:type attribute_value:str :param attribute_value: Attribute value.
-
end_span
()[source]¶ End a span. Remove the span from the span stack, and update the span_id in TraceContext as the current span_id which is the peek element in the span stack.
-