Bases: ABC
A span represents a single operation within a trace.
Sets the current time as the span’s end time.
The span’s end time is the wall time at which the operation finished.
Only the first call to end should modify the span, and implementations are free to ignore or raise on further calls.
Gets the span’s SpanContext.
Get an immutable, serializable identifier for this span that can be used to create new child spans.
A opentelemetry.trace.SpanContext
with a copy of this span’s immutable state.
Sets Attributes.
Sets Attributes with the key and value passed as arguments dict.
Note: The behavior of None value attributes is undefined, and hence strongly discouraged. It is also preferred to set attributes at span creation, instead of calling this method later since samplers can only consider information already present during span creation.
Sets an Attribute.
Sets a single Attribute with the key and value passed as arguments.
Note: The behavior of None value attributes is undefined, and hence strongly discouraged. It is also preferred to set attributes at span creation, instead of calling this method later since samplers can only consider information already present during span creation.
Adds an Event.
Adds a single Event with the name and, optionally, a timestamp and attributes passed as arguments. Implementations should generate a timestamp if the timestamp argument is omitted.
Adds a Link.
Adds a single Link with the SpanContext of the span to link to and, optionally, attributes passed as arguments. Implementations may ignore calls with an invalid span context if both attributes and TraceState are empty.
Note: It is preferred to add links at span creation, instead of calling this method later since samplers can only consider information already present during span creation.
Updates the Span name.
This will override the name provided via opentelemetry.trace.Tracer.start_span()
.
Upon this update, any sampling behavior based on Span name will depend on the implementation.
Returns whether this span will be recorded.
Returns true if this Span is active and recording information like events with the add_event operation and attributes using set_attribute.
Sets the Status of the Span. If used, this will override the default Span status.
Records an exception as a span event.
Bases: int
A bitmask that represents options specific to the trace.
The only supported option is the “sampled” flag (0x01
). If set, this flag indicates that the trace may have been sampled upstream.
See the W3C Trace Context - Traceparent spec for details.
A list of key-value pairs representing vendor-specific trace info.
Keys and values are strings of up to 256 printable US-ASCII characters. Implementations should conform to the W3C Trace Context - Tracestate spec, which describes additional restrictions on valid field values.
Adds a key-value pair to tracestate. The provided pair should adhere to w3c tracestate identifiers format.
A new TraceState with the modifications applied.
If the provided key-value pair is invalid or results in tracestate that violates tracecontext specification, they are discarded and same tracestate will be returned.
Updates a key-value pair in tracestate. The provided pair should adhere to w3c tracestate identifiers format.
A new TraceState with the modifications applied.
If the provided key-value pair is invalid or results in tracestate that violates tracecontext specification, they are discarded and same tracestate will be returned.
Deletes a key-value from tracestate.
key (str
) – A valid tracestate key to remove key-value pair from tracestate
A new TraceState with the modifications applied.
If the provided key-value pair is invalid or results in tracestate that violates tracecontext specification, they are discarded and same tracestate will be returned.
Creates a w3c tracestate header from a TraceState.
A string that adheres to the w3c tracestate header format.
Parses one or more w3c tracestate header into a TraceState.
header_list (List
[str
]) – one or more w3c tracestate headers.
A valid TraceState that contains values extracted from the tracestate header.
If the format of one headers is illegal, all values will be discarded and an empty tracestate will be returned.
If the number of keys is beyond the maximum, all values will be discarded and an empty tracestate will be returned.
Bases: Tuple
[int
, int
, bool
, TraceFlags
, TraceState
, bool
]
The state of a Span to propagate between processes.
This class includes the immutable attributes of a Span
that must be propagated to a span’s children and across process boundaries.
trace_id – The ID of the trace that this span belongs to.
span_id – This span’s ID.
is_remote – True if propagated from a remote parent.
trace_flags – Trace options to propagate.
trace_state – Tracing-system-specific info to propagate.
Bases: Span
The Span that is used when no Span implementation is available.
All operations are no-op except context propagation.
Gets the span’s SpanContext.
Get an immutable, serializable identifier for this span that can be used to create new child spans.
A opentelemetry.trace.SpanContext
with a copy of this span’s immutable state.
Returns whether this span will be recorded.
Returns true if this Span is active and recording information like events with the add_event operation and attributes using set_attribute.
Sets the current time as the span’s end time.
The span’s end time is the wall time at which the operation finished.
Only the first call to end should modify the span, and implementations are free to ignore or raise on further calls.
Sets Attributes.
Sets Attributes with the key and value passed as arguments dict.
Note: The behavior of None value attributes is undefined, and hence strongly discouraged. It is also preferred to set attributes at span creation, instead of calling this method later since samplers can only consider information already present during span creation.
Sets an Attribute.
Sets a single Attribute with the key and value passed as arguments.
Note: The behavior of None value attributes is undefined, and hence strongly discouraged. It is also preferred to set attributes at span creation, instead of calling this method later since samplers can only consider information already present during span creation.
Adds an Event.
Adds a single Event with the name and, optionally, a timestamp and attributes passed as arguments. Implementations should generate a timestamp if the timestamp argument is omitted.
Adds a Link.
Adds a single Link with the SpanContext of the span to link to and, optionally, attributes passed as arguments. Implementations may ignore calls with an invalid span context if both attributes and TraceState are empty.
Note: It is preferred to add links at span creation, instead of calling this method later since samplers can only consider information already present during span creation.
Updates the Span name.
This will override the name provided via opentelemetry.trace.Tracer.start_span()
.
Upon this update, any sampling behavior based on Span name will depend on the implementation.
Sets the Status of the Span. If used, this will override the default Span status.
Records an exception as a span event.
Convenience trace ID formatting method :type trace_id: int
:param trace_id: Trace ID int
The trace ID (16 bytes) cast to a 32-character hexadecimal string
Convenience span ID formatting method :type span_id: int
:param span_id: Span ID int
The span ID (8 bytes) cast to a 16-character hexadecimal string
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4