MCMMCM DocsEngineering (Internal)
HLDModulesObservability
v1.2 is unreleased — see v1.1 for the current stable release.

Traces

Distributed request tracing via Elastic APM Server with OpenTelemetry compatibility.

Traces

The Observability module collects distributed traces via Elastic APM Server, which accepts data from both Elastic APM language agents and any OpenTelemetry-instrumented application via the OTLP endpoint. Traces are stored in Elasticsearch and surfaced in the MCM UI with latency breakdowns, error rates, and full span trees.


Data Flow


Collected Fields

FieldDescription
Trace IDUnique identifier that groups all spans belonging to a single end-to-end request
OperationHTTP method + path, database query, gRPC method, or queue operation name
DurationTotal elapsed time from the start of the root span to its completion
Statussuccess — request completed without error · error — an exception or non-2xx response occurred
SpansNumber of child operations (DB calls, HTTP sub-requests, cache lookups) within the trace

Duration Thresholds

DurationSeverityColour
≥ 2 000 msCriticalRed
≥ 500 msWarningAmber
< 500 msNormal

OpenTelemetry Compatibility

Elastic APM Server exposes a native OTLP gRPC endpoint (4317) and OTLP HTTP endpoint (4318). Any application instrumented with the OpenTelemetry SDK sends traces without modification — no Elastic-specific agent is required.

Configure the OTel SDK to point at the APM Server:

# OpenTelemetry SDK environment variables
OTEL_EXPORTER_OTLP_ENDPOINT: "http://${APM_SERVER_HOST}:4318"
OTEL_SERVICE_NAME: "my-service"
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=production"

For Elastic APM agents (Java, Node.js, Python, Go, .NET, Ruby, PHP), set:

ELASTIC_APM_SERVER_URL: "http://${APM_SERVER_HOST}:8200"
ELASTIC_APM_SERVICE_NAME: "my-service"
ELASTIC_APM_ENVIRONMENT: "production"

Supported Resource Types

All resource types supported by the Observability module can emit traces — the APM agent runs inside the application process, not at the OS level. The MCM UI associates each trace with its parent resource via the resource_id tag that MCM injects into the APM Server configuration.

Resource TypeTypical Instrumentation
AWS EC2 / Ubuntu Host / Azure VM / GCP ComputeElastic APM agent or OTel SDK inside the application process
Docker ContainerOTel SDK bundled in the container image; APM Server reachable via Docker network
K8s Cluster / PodOTel Collector as a sidecar or cluster-wide DaemonSet forwarding to Elastic APM Server

On this page