Span

class oci.apm_traces.models.Span(**kwargs)

Bases: object

Definition of a span object.

Methods

__init__(**kwargs) Initializes a new Span object with values from keyword arguments.

Attributes

duration_in_ms [Required] Gets the duration_in_ms of this Span.
is_error [Required] Gets the is_error of this Span.
key [Required] Gets the key of this Span.
kind Gets the kind of this Span.
logs Gets the logs of this Span.
operation_name [Required] Gets the operation_name of this Span.
parent_span_key Gets the parent_span_key of this Span.
service_name Gets the service_name of this Span.
tags Gets the tags of this Span.
time_ended [Required] Gets the time_ended of this Span.
time_started [Required] Gets the time_started of this Span.
trace_key [Required] Gets the trace_key of this Span.
__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.
  • 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.
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
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
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 to comply with OCI API fields naming conventions. The spanKey maps to the spanId in the APM repository.

Returns:The key of this Span.
Return type:str
kind

Gets the kind of this Span. Kind associated with the span.

Returns:The kind of this Span.
Return type:str
logs

Gets the logs of this Span. List of logs associated with the span.

Returns:The logs of this Span.
Return type:list[oci.apm_traces.models.SpanLogCollection]
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
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
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
tags

Gets the tags of this Span. List of tags associated with the span.

Returns:The tags of this Span.
Return type:list[oci.apm_traces.models.Tag]
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
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
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