APM reference

This page describes what data is provided by APM and how it is used.

Span schema

Spans are ingested to the Tracing/Span dataset.

Observe APM is OpenTelemetry-native, meaning it is powered entirely by OpenTelemetry data and is fully compatible with the OpenTelemetry semantic conventions. In order to make the product more intuitive for users who may not be intimately familiar with OpenTelemetry, we transform raw OpenTelemetry data into the following schema:

Span dataset fieldUnderlying OpenTelemetry field from which it is derived
start_timeSpan start_time_unix_nano
durationSpan start_time_unix_nano and send_time_unix_nano
response_statusSpan status.code
service_nameservice.name in the span's resource attributes
span_nameSpan name
status_codederived from http.status_code, rpc.status_code, grpc.status_code, or rpc.grpc.status_code in the span's attributes
errorTrue if the Span Status is set to Error, false otherwise
status_messageSpan Status object's status.message
span_typeSpan kind (see below for the mapping between span_type and kind
service_namespaceservice.namespace in the span's resource attributes
service_instance_idservice.instance.id in the span's resource attributes
environmentdeployment.environment in the span's resource attributes
service_versionservice.version in the span's resource attributes
attributesThe span's attributes
resource_attributesThe span's resource attributes
instrumentation_libraryInstrumentation Scope object
span_id
parent_span_id
trace_id

The span_type field provides an intuitive categorization of OpenTelemetry span kinds, mapping 1:1 to the kind field in OpenTelemetry but using more user-friendly terms to describe the span’s role in the system:

Observe span_type valueOpenTelemetry Span kind value
Service entry pointSERVER
Remote callCLIENT
Async consumerCONSUMER
Async producerPRODUCER
Internal operationINTERNAL

Endpoint terminology

The "Endpoint" terminology in Observe has equivalents in other APM products:

ObserveDatadogNew RelicAppDynamics / Dynatrace
EndpointResourceTransactionBusiness Transaction

Toggling between HTTP/RPC endpoints and message-based endpoints in Observe also has equivalents in other APM products:

ObserveDatadogNew Relic
Endpoint dropdownOperation dropdownWeb/non-web transaction dropdown

Underlying OpenTelemetry data used to detect endpoints:

  • Spans with kind SERVER are used to detect HTTP/RPC endpoints, which are known as "Service entry points" in Observe. The endpoint name in Observe is the span name.
  • Spans with kind CONSUMER are used to detect message-based endpoints, which are known as "Async consumers" in Observe. The endpoint name in Observe is the span name.

The Service Inspector also allows you to toggle between synchronous (HTTP/RPC) and asynchronous (message-based) endpoints with the "operation type" dropdown.

Correlation tags on span data

The following correlation tags are added to the Span dataset and can be used to correlate other data with traces:

Correlation tagSpan dataset field on which it is defined
deployment.environment.nameresource_attributes."deployment.environment"
k8s.cluster.uidresource_attributes."k8s.cluster.uid"
k8s.namespace.nameresource_attributes."k8s.namespace.name"
k8s.pod.nameresource_attributes."k8s.pod.name"
service.nameresource_attributes."service.name"
service.namespaceresource_attributes."service.namespace"
service.versionresource_attributes."service.version"
service.nameservice_name
service.namespaceservice_namespace
operation.namespan_name
service.versionservice_version

Span event dataset schema

Span events are ingested to the Tracing/Span Event dataset.

Span Event dataset fieldUnderlying OTel field from which it is derived
span_idthe span_id of the span containing the event
trace_idthe trace_id of the span containing the event
event_nameThe event's name
attributesThe event's attributes
resource_attributesThe resource attributes of the span containing the event

Span link dataset schema

Span links are ingested to the Tracing/Span Link dataset.

Span Link dataset fieldUnderlying OTel field from which it is derived
span_idthe span_id of the span containing the link
trace_idthe trace_id of the span containing the link
linked_span_idthe link's span_id
linked_trace_idthe link's trace_id
attributesthe link's attributes

APM metrics

The following metrics are derived from spans and are available in the Metric Explorer, and can be used for dashboarding and monitors.

Facets

The following dimensions are tracked by all the APM metrics:

  • service.name, peer.db.name, and peer.messaging.system: they are mutually exclusive and represent the system being instrumented -- microservice, database, or messaging system.
  • service.namespace
  • service.version
  • span.name: only the span names for spans that correspond to endpoints (i.e., spans of type Service entry point or Async consumer) are available in APM metrics
  • span.type
  • k8s.cluster.uid
  • k8s.namespace.name
  • k8s.pod.name

RED metrics

  • apm_service_call_count
  • apm_service_error_count
  • apm_service_duration (histogram)
  • The following metrics are the same as above but with extra dimensions, i.e., status.code and status.message:
    • apm_service_call_count_with_status
    • apm_service_error_count_with_status
    • apm_service_duration_with_status
  • apm_service_duration_log: same as apm_service_duration but values are log base-2
  • apm_service_duration_sum_with_status: total duration (i.e., sum of latency across all invocations)
  • apm_service_exception_count: exception count per service
    • Unique labels/dimensions:
      • exception.type
      • exception.stacktrace
      • exception.message.pattern.hash
  • apm_service_error_count_by_fingerprint: number of invocations per unique exceptions per service

Other metrics are also published beyond the basic RED metrics, all with the prefix apm_.