deep.api.plugin.span
Definition of span processor.
Span processor gives the ability to generate spans dynamically.
Span
Internal type to wrap spans.
Source code in deep/api/plugin/span/__init__.py
name
abstractmethod
property
Get the span name.
span_id
abstractmethod
property
Get the span id.
trace_id
abstractmethod
property
Get the trace id.
add_attribute(key, value)
abstractmethod
Add an attribute to the span.
:param key: the attribute key :param value: the attribute value
add_event(name, attributes=None)
abstractmethod
Add an event to the span.
:param name: the event name :param attributes: the event attributes :return:
SpanProcessor
Bases: Plugin
, ABC
Span processor connects Deep to a span provider.
Source code in deep/api/plugin/span/__init__.py
create_span(name, context_id, tracepoint_id)
abstractmethod
Create and return a new span.
:param name: the name of the span to create :param context_id: the id of the context :param tracepoint_id: the id of thr tracepoint :return: the created span
Source code in deep/api/plugin/span/__init__.py
current_span()
abstractmethod
Get the current span from the underlying provider.
:return: the current span