Span¶
- class oci.apm_traces.models.Span(**kwargs)¶
Bases:
objectDefinition of a span object.
Attributes:
A constant which can be used with the source_name property of a Span.
A constant which can be used with the source_name property of a Span.
[Required] Gets the duration_in_ms of this Span.
[Required] Gets the is_error of this Span.
[Required] Gets the key of this Span.
Gets the kind of this Span.
Gets the logs of this Span.
[Required] Gets the operation_name of this Span.
Gets the parent_span_key of this Span.
Gets the service_name of this Span.
Gets the source_name of this Span.
Gets the tags of this Span.
Gets the tags_metadata of this Span.
[Required] Gets the time_ended of this Span.
[Required] Gets the time_started of this Span.
[Required] Gets the trace_key of this Span.
Methods:
__init__(**kwargs)Initializes a new Span object with values from keyword arguments.
- SOURCE_NAME_SPANS = 'SPANS'¶
A constant which can be used with the source_name property of a Span. This constant has a value of “SPANS”
- SOURCE_NAME_SYN_SPANS = 'SYN_SPANS'¶
A constant which can be used with the source_name property of a Span. This constant has a value of “SYN_SPANS”
- __init__(**kwargs)¶
Initializes a new Span object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
key (str) – The value to assign to the key property of this Span.
parent_span_key (str) – The value to assign to the parent_span_key property of this Span.
trace_key (str) – The value to assign to the trace_key property of this Span.
time_started (datetime) – The value to assign to the time_started property of this Span.
time_ended (datetime) – The value to assign to the time_ended property of this Span.
duration_in_ms (int) – The value to assign to the duration_in_ms property of this Span.
operation_name (str) – The value to assign to the operation_name property of this Span.
service_name (str) – The value to assign to the service_name property of this Span.
kind (str) – The value to assign to the kind property of this Span.
tags (list[oci.apm_traces.models.Tag]) – The value to assign to the tags property of this Span.
tags_metadata (dict(str, TagMetadata)) – The value to assign to the tags_metadata property of this Span.
logs (list[oci.apm_traces.models.SpanLogCollection]) – The value to assign to the logs property of this Span.
is_error (bool) – The value to assign to the is_error property of this Span.
source_name (str) – The value to assign to the source_name property of this Span. Allowed values for this property are: “SPANS”, “SYN_SPANS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- property duration_in_ms¶
[Required] Gets the duration_in_ms of this Span. Total span duration in milliseconds.
- Returns
The duration_in_ms of this Span.
- Return type
int
- property is_error¶
[Required] Gets the is_error of this Span. Indicates if the span has an error.
- Returns
The is_error of this Span.
- Return type
bool
- property key¶
[Required] Gets the key of this Span. Unique identifier (spanId) for the span. Note that this field is defined as spanKey in the API and it maps to the spanId in the trace data in Application Performance Monitoring.
- Returns
The key of this Span.
- Return type
str
- property kind¶
Gets the kind of this Span. Kind associated with the span.
- Returns
The kind of this Span.
- Return type
str
- property logs¶
Gets the logs of this Span. List of logs associated with the span.
- Returns
The logs of this Span.
- Return type
- property operation_name¶
[Required] Gets the operation_name of this Span. Span name associated with the trace. This is usually the method or URI of the request.
- Returns
The operation_name of this Span.
- Return type
str
- property parent_span_key¶
Gets the parent_span_key of this Span. Unique parent identifier for the span if one exists. For root spans this will be null.
- Returns
The parent_span_key of this Span.
- Return type
str
- property service_name¶
Gets the service_name of this Span. Service name associated with the span.
- Returns
The service_name of this Span.
- Return type
str
- property source_name¶
Gets the source_name of this Span. Source of span (spans, syn_spans).
Allowed values for this property are: “SPANS”, “SYN_SPANS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The source_name of this Span.
- Return type
str
- property tags¶
Gets the tags of this Span. List of tags associated with the span.
- Returns
The tags of this Span.
- Return type
- property tags_metadata¶
Gets the tags_metadata of this Span. Metadata about the tags in the span.
- Returns
The tags_metadata of this Span.
- Return type
dict(str, TagMetadata)
- property time_ended¶
[Required] Gets the time_ended of this Span. Span end time. Timestamp when the span was completed.
- Returns
The time_ended of this Span.
- Return type
datetime
- property time_started¶
[Required] Gets the time_started of this Span. Span start time. Timestamp when the span was started.
- Returns
The time_started of this Span.
- Return type
datetime
- property trace_key¶
[Required] Gets the trace_key of this Span. Unique identifier for the trace.
- Returns
The trace_key of this Span.
- Return type
str