GitHub

NoopSpan

API reference for NoopSpan.

A span that records nothing, made where propagation is disabled or the tracer is off. Its ids are "noop" and it starts out ended.

Attributes

AttributeTypeDescription
span_idstr
trace_idstr
sampledbool
kindSpanKind
statusSpanStatus
attributesMapping[str, object]
linksSequence[SpanLink]
name= name
parent= parent
annotations= annotations

Functions

__init__

__init__(name, parent, annotations) -> None
ParameterTypeDescription
namestr
parentAnySpan | None
annotationsContext
def __init__(self, name: str, parent: AnySpan | None, annotations: Context) -> None:
    self.name = name
    self.parent = parent
    self.annotations = annotations

end

end(end_time, exit) -> None
ParameterTypeDescription
end_timeint
exitExit[object, object]
def end(self, end_time: int, exit: Exit[object, object], /) -> None:
    pass

attribute

attribute(key, value) -> None
ParameterTypeDescription
keystr
valueobject
def attribute(self, key: str, value: object, /) -> None:
    pass

event

event(name, start_time, attributes=None) -> None
ParameterTypeDescription
namestr
start_timeint
attributesMapping[str, object] | None = None
def event(
    self, name: str, start_time: int, attributes: Mapping[str, object] | None = None, /
) -> None:
    pass
add_links(links) -> None
ParameterTypeDescription
linksSequence[SpanLink]
def add_links(self, links: Sequence[SpanLink], /) -> None:
    pass