APM trace object
The following objects are directly related to the apmtrace API.
Each property, except span_count and error_count, corresponds to a column in the otel_traces table of the telemetry data source.
Most properties correspond to the column with the same name (e.g., span_name property corresponds to the SpanName column).
Where the names differ, the data source columns are specified in the tables below.
For the list of columns, see Supported telemetry data columns.
APM trace
The APM trace object represents a trace (the path that a request takes through your applications and services). A trace consists of one or more spans; each span represents a single operation.
The APM trace object is based on the root span of the trace (the span that starts the trace and has no parent span).
All properties contain data of the root span, except span_count and error_count, which are calculated from all spans of the trace.
The APM trace object has the following properties:
| Property | Type | Description |
|---|---|---|
| timestamp | integer | Unix time (in nanoseconds) when the root span started. Property behavior: - read-only |
| traceid | string | ID of the trace, shared by all spans that belong to the trace. Property behavior: - read-only |
| spanid | string | ID of the root span. Property behavior: - read-only |
| trace_state | string | Additional data, if any, that tracing tools attach to the trace (see W3C Trace Context). Property behavior: - read-only |
| span_name | string | Name of the operation that the root span represents (e.g., POST /zabbix.php).Property behavior: - read-only |
| span_kind | string | Role of the root span. Possible values: Unspecified - span kind is not specified;Internal - operation performed within an application;Server - handling of an incoming request;Client - outgoing request;Producer - creation of an asynchronous operation (e.g., sending a message);Consumer - processing of an asynchronous operation.Property behavior: - read-only |
| service_name | string | Name of the service that produced the root span (e.g., zabbix-nginx), taken from the OpenTelemetry service.name resource attribute.Property behavior: - read-only |
| resource_attributes | object | Key-value resource attributes of the root span (e.g., host.name: eabf8c2a5ddc).Property behavior: - read-only |
| scope_name | string | Name of the instrumentation scope that produced the root span. Property behavior: - read-only |
| scope_version | string | Version of the instrumentation scope. Property behavior: - read-only |
| span_attributes | object | Key-value span attributes of the root span (e.g., http.method: POST).Property behavior: - read-only |
| duration | integer | Nanoseconds of the duration of the trace. Property behavior: - read-only |
| status_code | string | Status of the operation that the root span represents. Possible values: Unset - no explicit status has been assigned to the root span;Ok - the operation was completed successfully;Error - the operation was completed with an error.Property behavior: - read-only |
| status_message | string | Additional information, if any, about the status of the root span. Property behavior: - read-only |
| events | array | Array of event objects of the root span, that is, notable points in time during the operation (e.g., exceptions). Property behavior: - read-only |
| links | array | Array of link objects of the root span, which point to related spans in the same or another trace. Property behavior: - read-only |
| span_count | integer | Total number of spans in the trace. Property behavior: - read-only |
| error_count | integer | Number of spans in the trace with status_code set to Error.Property behavior: - read-only |
Event
The event object has the following properties.
| Property | Type | Description |
|---|---|---|
| timestamp | integer | Unix time (in nanoseconds) when the event occurred. Data source column: Events.Timestamp |
| name | string | Name of the event. Data source column: Events.Name |
| attributes | object | Key-value attributes with additional information, if any, about the event. Data source column: Events.Attributes |
Link
The link object has the following properties.
| Property | Type | Description |
|---|---|---|
| traceid | string | ID of the trace that contains the linked span. Data source column: Links.TraceId |
| spanid | string | ID of the linked span. Together with traceid, uniquely identifies the linked span.Data source column: Links.SpanId |
| trace_state | string | Trace state, if any, of the linked span (see W3C Trace Context). Data source column: Links.TraceState |
| attributes | object | Key-value attributes with additional information about the link. Data source column: Links.Attributes |