A span made by a Tracer. Once it has ended, end,
attribute, event and add_links do nothing; an ended span
can still be read and used as a parent.
Attributes#
| Attribute | Type | Description |
|---|---|---|
name | str | |
span_id | str | |
trace_id | str | |
parent | AnySpan | None | |
annotations | Context | |
status | SpanStatus | |
attributes | Mapping[str, object] | |
links | Sequence[SpanLink] | |
sampled | bool | |
kind | SpanKind |
Functions#
end#
end(end_time, exit) -> None| Parameter | Type | Description |
|---|---|---|
end_time | int | |
exit | Exit[object, object] |
def end(self, end_time: int, exit: Exit[object, object], /) -> None: ...attribute#
attribute(key, value) -> None| Parameter | Type | Description |
|---|---|---|
key | str | |
value | object |
def attribute(self, key: str, value: object, /) -> None: ...event#
event(name, start_time, attributes=None) -> None| Parameter | Type | Description |
|---|---|---|
name | str | |
start_time | int | |
attributes | Mapping[str, object] | None = None |
def event(
self, name: str, start_time: int, attributes: Mapping[str, object] | None = None, /
) -> None: ...add_links#
add_links(links) -> None| Parameter | Type | Description |
|---|---|---|
links | Sequence[SpanLink] |
def add_links(self, links: Sequence[SpanLink], /) -> None: ...