APM observability reference

APM observability reference

This page describes the data APM provides and how it is used.

APM is OpenTelemetry-native. It is powered by OpenTelemetry data and follows the OpenTelemetry semantic conventions. Raw OpenTelemetry fields are transformed into the schemas below so the same data can be queried without knowing every semantic-convention name.

Datasets

A trace datastream writes three source datasets. APM content then builds the datasets under Tracing/.

Source datasets

DatasetWhat it holds
Tracing/Span RawRaw OpenTelemetry spans, as ingested.
Tracing/Span EventSpan events.
Tracing/Span LinkSpan links.

APM content datasets

DatasetWhat it holds
Tracing/SpanThe modeled span view described in Span schema. Built from Tracing/Span Raw.
Tracing/TraceOne row per trace, built from Tracing/Span.
Tracing/Canonical TraceA compact trace used by Service Explorer and the Service Inspector.
Tracing/Service Explorer SpansSpans shaped for Service Explorer.
Tracing/ServiceDiscovered services.
Tracing/DeploymentDiscovered deployments.
Tracing/Service MetricsRED metrics derived from spans. See APM metrics. This dataset is omitted on tenants where those metrics are produced by the agent instead.
Tracing/Service Edge MetricsCalls between services, and calls to databases and message brokers.
Tracing/Service Inspector MetricsMetrics behind the Service Inspector.
Tracing/Service Explorer Drilldown MetricsMetrics behind Service Explorer drilldown.
Tracing/Error Tracking MetricsException and error-fingerprint metrics, from span events and Service Explorer spans.

Tracing/Service Explorer Spans carries the same correlation tags as Tracing/Span.

Span schema

Tracing/Span is a view of Tracing/Span Raw. Spans are ingested into Tracing/Span Raw. The columns below are the modeled view.

Customers can add further columns with span field extraction. Those columns are not part of this default schema.

Dataset fieldUnderlying OpenTelemetry field from which it is derived
start_timeSpan start_time_unix_nano.
end_timeSpan end_time_unix_nano. Hidden in the UI by default. It is the end of the span interval.
durationend_time_unix_nano minus start_time_unix_nano, in nanoseconds.
response_status"Error" when the span status code is STATUS_CODE_ERROR (2). "Ok" otherwise, including when the status is unset.
service_nameservice.name in the span's resource attributes.
span_nameSpan name.
status_codeFirst present span attribute among rpc.grpc.status_code, grpc.status_code, rpc.status_code, http.status_code, and http.response.status_code. Null when none are set.
errortrue when the span status code is STATUS_CODE_ERROR (2). false otherwise.
status_messageSpan status status.message.
span_typeSpan kind. See span_type. Unrecognized kinds, including UNSPECIFIED, are Unknown.
service_namespaceservice.namespace in the span's resource attributes. Empty string when unset.
service_instance_idservice.instance.id in the span's resource attributes. Empty string when unset.
environmentdeployment.environment.name in the span's resource attributes, falling back to deployment.environment. Empty string when neither is set.
service_versionservice.version in the span's resource attributes. Empty string when unset.
attributesThe span's attributes.
resource_attributesThe span's resource attributes.
instrumentation_libraryThe span's instrumentation scope.
parent_span_idSpan parent_span_id.
span_idSpan span_id.
trace_idSpan trace_id.
fieldsSpan fields that are not promoted to their own columns, including status, trace_state, flags, and dropped-count fields.
metaIngest metadata. This is not an OpenTelemetry field.

Span event Dataset schema

Span events are ingested to Tracing/Span Event. A span event is something that happened during a span, such as an exception.

Dataset fieldUnderlying OpenTelemetry field from which it is derived
timestampThe event's time_unix_nano.
span_idspan_id of the span that contains the event.
trace_idtrace_id of the span that contains the event.
event_nameThe event's name.
attributesThe event's attributes.
resource_attributesResource attributes of the span that contains the event.
fieldsEvent fields that are not promoted to their own columns. Includes dropped_attributes_count.
metaIngest metadata. This is not an OpenTelemetry field.

Span link Dataset schema

Span links are ingested to Tracing/Span Link. A span link connects spans that are related but do not have a parent-child relationship, often across traces.

Dataset fieldUnderlying OpenTelemetry field from which it is derived
start_timestart_time_unix_nano of the span that contains the link.
end_timeend_time_unix_nano of the span that contains the link.
span_idspan_id of the span that contains the link.
trace_idtrace_id of the span that contains the link.
linked_span_idThe link's span_id.
linked_trace_idThe link's trace_id.
attributesThe link's attributes.
fieldsLink fields that are not promoted to their own columns: trace_state, dropped_attributes_count, and flags.
metaIngest metadata. This is not an OpenTelemetry field.

Correlation tags

Correlation tags join traces to other data. Tags on Tracing/Span are below. Tracing/Service Explorer Spans uses this same set.

Tracing/Span

Correlation tagField
deployment.environment.nameenvironment
service.nameservice_name
service.namespaceservice_namespace
service.versionservice_version
span.idspan_id
operation.namespan_name
trace.idtrace_id
host.nameresource_attributes."host.name"
host.uidresource_attributes."host.uid"
k8s.cluster.nameresource_attributes."k8s.cluster.name"
k8s.cluster.uidresource_attributes."k8s.cluster.uid"
k8s.namespace.nameresource_attributes."k8s.namespace.name"
k8s.pod.nameresource_attributes."k8s.pod.name"
k8s.pod.uidresource_attributes."k8s.pod.uid"
k8s.cronjob.nameresource_attributes."k8s.cronjob.name"
k8s.daemonset.nameresource_attributes."k8s.daemonset.name"
k8s.deployment.nameresource_attributes."k8s.deployment.name"
k8s.ingress.nameresource_attributes."k8s.ingress.name"
k8s.job.nameresource_attributes."k8s.job.name"
k8s.node.nameresource_attributes."k8s.node.name"
k8s.node.uidresource_attributes."k8s.node.uid"
k8s.replicaset.nameresource_attributes."k8s.replicaset.name"
k8s.statefulset.nameresource_attributes."k8s.statefulset.name"
peer.db.nameattributes."peer.db.name"
peer.messaging.systemattributes."peer.messaging.system"
messaging.destination.nameattributes."messaging.destination.name"
peer.server.addressattributes."peer.server.address"

Tracing/Span Event

Correlation tagField
span.idspan_id
trace.idtrace_id
k8s.pod.nameresource_attributes."k8s.pod.name"
k8s.namespace.nameresource_attributes."k8s.namespace.name"
k8s.cluster.uidresource_attributes."k8s.cluster.uid"
deployment.environment.nameresource_attributes."deployment.environment"
service.nameresource_attributes."service.name"

On span events, deployment.environment.name is read from resource_attributes."deployment.environment".

Tracing/Service and Tracing/Deployment

DatasetCorrelation tagField
Tracing/Servicedeployment.environment.nameenvironment
Tracing/Serviceservice.nameservice_name
Tracing/Serviceservice.namespaceservice_namespace
Tracing/Deploymentdeployment.environment.nameenvironment
Tracing/Deploymentservice.nameservice_name
Tracing/Deploymentservice.namespaceservice_namespace
Tracing/Deploymentservice.versionservice_version

Service Metrics, Service Edge Metrics, Service Inspector Metrics, Service Explorer Drilldown Metrics, and Error Tracking Metrics also publish correlation tags. Those tags are paths inside each dataset's tags column and follow the dimensions in APM metrics. peer.messaging.system and messaging.destination.name are registered on those metric datasets when message brokers are modeled as entities.

APM metrics

APM derives metrics from spans. They are available in Metric Explorer, and they can be used on dashboards and in monitors.

The RED metrics in this section are published on Tracing/Service Metrics. On tenants where that dataset is retired, rate, error, and duration are produced by the agent, and the metric names can differ.

Dimensions

Dimensions are the labels on these metrics. Filter and group by them to choose a service, version, endpoint, cluster, or pod.

service.name, peer.db.name, and peer.messaging.system name what the point is about. A point is for a service, a database, or a message broker, and only one of those three is set. Database points are always produced. Message-broker points, and messaging.destination.name, are produced when message brokers are modeled as entities.

The basic rate, error, and duration metrics carry service, namespace, environment, span name, and span type. apm_service_duration_log also carries service.version. Status, Kubernetes, host, container, and peer labels are populated on the _with_status metrics.

DimensionWhat it tells you
service.nameThe service that handled the call. Empty when the point is for a database or a message broker.
peer.db.nameThe database the call went to. Set on database points.
peer.messaging.systemThe message broker, such as Kafka. Set on message-broker points.
messaging.destination.nameThe queue or topic on a message-broker point. Present when message brokers are modeled as entities.
service.namespaceA grouping of services, from the resource attribute service.namespace. Often a team or system name.
service.versionThe deployed version of the service, from service.version.
environmentThe deployment environment, from deployment.environment.name, falling back to deployment.environment.
span.nameThe operation name. For a service this is the endpoint. For a database or message broker this is the call's span name.
span.typeThe span's role, such as Service entry point, Async consumer, or Remote call.
status.codeThe protocol status code, from HTTP, gRPC, or RPC. Populated on the _with_status metrics.
status.messageThe span status message. Populated on the _with_status metrics.
k8s.cluster.uidThe Kubernetes cluster UID of the workload that emitted the span.
k8s.namespace.nameThe Kubernetes namespace of that workload.
k8s.pod.nameThe Kubernetes pod that emitted the span.
host.nameThe host that emitted the span.
container.idThe container that emitted the span.

RED metrics

Rate, Errors, and Duration (RED) are the three health signals for a service. They count incoming work: calls that entered a service, and messages a service consumed. They also count calls to databases, and calls to message brokers when message brokers are modeled as entities.

MetricWhat it tells you
apm_service_call_countHow many calls the service handled. This is the rate.
apm_service_error_countHow many of those calls failed. Divide by the call count for the error rate. A call is failed when response_status is Error.
apm_service_durationHow long those calls took, as a histogram in nanoseconds. Use it for percentiles such as p50, p95, and p99.
apm_service_call_count_with_statusCall count split by status.code and status.message.
apm_service_error_count_with_statusError count split by status.code and status.message.
apm_service_duration_with_statusLatency histogram split by status.code and status.message.
apm_service_duration_logThe same latency histogram, with each duration stored as its log base 10. Very fast and very slow calls stay visible on one chart. The values are log10 of the duration in nanoseconds.
apm_service_duration_sum_with_statusTotal time spent, in nanoseconds, split by status. Divide by apm_service_call_count_with_status for the average latency.

Error count metrics

These metrics are on Tracing/Error Tracking Metrics. They break failures down by exception or by status-message pattern. They are not the RED error signal.

MetricWhat it tells you
apm_service_exception_countHow many exception events a service emitted. An exception event is a span event named exception.
apm_service_error_count_by_fingerprintHow many failed incoming calls share the same status-message pattern. Counts service entry points and async consumers whose span status is Error.
apm_service_exception_count_by_fingerprintHow many exceptions share a stack-trace fingerprint. Published when exception fingerprinting is enabled, for Go, Python, and Node.js.

apm_service_exception_count is split by these dimensions, in addition to service, version, environment, and Kubernetes identity:

DimensionWhat it tells you
exception.typeThe exception type.
exception.stacktraceThe exception stack trace.
exception.message.pattern.hashA hash of the message shape. Letters are stripped and whitespace is collapsed, so similar messages group together.

apm_service_error_count_by_fingerprint is split by service.name, service.namespace, environment, span.name, span.type, status.code, and status.message.

apm_service_exception_count_by_fingerprint adds exception.fingerprint, exception.message, language, trace.id, and span.id.

Service edge metrics

These metrics are on Tracing/Service Edge Metrics. They describe a call from one service to another, or from a service to a database or message broker. Parent dimensions name the caller.

MetricWhat it tells you
apm_service_edge_call_countHow many calls crossed this edge.
apm_service_edge_error_countHow many of those calls failed.
apm_service_edge_durationLatency of those calls, as a histogram in nanoseconds.
apm_service_edge_duration_sumTotal time spent on those calls, in nanoseconds. Published when message brokers are modeled as entities.

Edge points also carry parent.service.name, parent.service.namespace, and parent.environment. When message brokers are modeled as entities, they also carry messaging.operation.name, messaging.operation.type, and messaging.consumer.group.name.

Service Inspector metrics

These metrics are on Tracing/Service Inspector Metrics. The for_service metrics are the service's own entry points. The edge metrics are calls that service made, and they include the parent service and parent span.

MetricWhat it tells you
apm_service_call_count_for_serviceCall count for the service's own entry points.
apm_service_error_count_for_serviceError count for those entry points.
apm_service_duration_for_serviceLatency histogram for those entry points.
apm_service_edge_call_count_for_serviceCall count for an edge from this service.
apm_service_edge_error_count_for_serviceError count for that edge.
apm_service_edge_duration_for_serviceLatency histogram for that edge.

Inspector points can also carry parent.span.name, for.service.name, for.service.namespace, for.environment, and for.span.name. Database, external-call, and message-broker rows leave service.name empty and set peer.db.name, peer.server.address, or peer.messaging.system instead.

Service Explorer drilldown metrics

These metrics are on Tracing/Service Explorer Drilldown Metrics. They break an edge down by endpoint.

MetricWhat it tells you
apm_service_edge_call_count_by_endpointCall count for an edge, split by endpoint.
apm_service_edge_call_count_by_endpoint_uniqueDistinct-call count for that edge and endpoint.
apm_service_edge_duration_sum_by_endpointTotal time spent on that edge and endpoint, in nanoseconds.

Drilldown points also carry service.kind, parent.service.name, parent.service.namespace, parent.environment, and parent.span.name.

Terminology

span_type is how Observe by Snowflake names the OpenTelemetry span kind. Endpoint is the product term for an incoming operation, and it lines up with the entry-point span types below.

span_type

OpenTelemetry records a span's role as kind, using SERVER, CLIENT, CONSUMER, PRODUCER, and INTERNAL. Observe by Snowflake keeps that split and shows it as span_type. Each label matches one kind. A kind Observe by Snowflake does not recognize, including UNSPECIFIED, is Unknown.

What you see in Observe by SnowflakeWhat the span isOpenTelemetry span kind
Service entry pointA request entered this service. This is an incoming HTTP or RPC call, and it is what Observe by Snowflake treats as an endpoint. The endpoint name is the span name.SERVER
Remote callThis service called something else: another service, a database, or another downstream system.CLIENT
Async consumerThis service received a message from a queue or topic. Observe by Snowflake treats these as message-based endpoints, again named by the span name.CONSUMER
Async producerThis service published a message to a queue or topic.PRODUCER
Internal operationWork inside the service that does not cross a service or messaging boundary.INTERNAL
UnknownThe span kind was UNSPECIFIED or a value Observe by Snowflake does not map.UNSPECIFIED or unrecognized

Endpoint terminology

The Endpoint term in Observe by Snowflake has equivalents in other APM products:

Observe by SnowflakeDatadogNew RelicAppDynamics / Dynatrace
EndpointResourceTransactionBusiness Transaction

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

Observe by SnowflakeDatadogNew Relic
Endpoint dropdownOperation dropdownWeb/non-web transaction dropdown

OpenTelemetry data used to detect endpoints:

  • Spans with kind SERVER are HTTP/RPC endpoints. In Observe by Snowflake these are Service entry points. The endpoint name is the span name.
  • Spans with kind CONSUMER are message-based endpoints. In Observe by Snowflake these are Async consumers. The endpoint name is the span name.

The Service Inspector toggles between synchronous (HTTP/RPC) and asynchronous (message-based) endpoints with the operation type dropdown.


Did this page help you?