For AI agents: this documentation is indexed for you in llms.txt, and all of it in /llms.txt. Every page is also available as markdown: append .md to its address.

Tracing

This page shows how to enable, tune, verify, and disable OpenTelemetry distributed tracing for Session Management Controller (SMC) through the Helm chart. For the concept and the list of traced operations, see Distributed tracing.

Prerequisites

  • The SMC release that introduces tracing, or later. The chart pins a compatible SMC image automatically, so you do not select an image version.
  • A trace collector with an OpenTelemetry Protocol (OTLP) receiver that is reachable from the SMC pod, such as the OpenTelemetry Collector of the Cennso telemetry stack or a Grafana Tempo distributor.

Enable tracing

Create a values file tracing-values.yaml:

yaml

Upgrade the release with the values file:

bash

The chart maps every tracing parameter to a standard OTEL_* environment variable on the SMC container:

Changing any tracing parameter restarts the SMC pod, because the environment of the container changes.

When tracing is enabled, SMC log lines additionally carry the trace_id and span_id fields holding the span context of the active span.

Choose a sampler

The sampler bounds the tracing overhead and the trace data volume:

The parentbased_* samplers follow the sampling decision in an incoming traceparent header, and apply your configured policy only to new traces. So if an upstream component already sampled a request, SMC traces it too.

Operational impact

Tracing adds CPU and memory load to the SMC container in proportion to the configured sample rate. Most of the added CPU goes into building spans and encoding the export batches that SMC sends to the collector.

The following figures come from a before/after measurement at full sampling (samplerArg: "1.0"). The test ran a sustained workload of about 100 Create Session Requests per second, with around 200,000 sessions in flight:

The in-cluster OTLP collector takes on about 12m more average CPU, a small addition next to the log and metric traffic it already carries.

CPU cost falls with the sample rate. At the recommended production setting of samplerArg: "0.01" (one percent), the increase over baseline stays in the single-digit percent range. Reserve full sampling for short troubleshooting sessions. Memory overhead is small and does not grow with the session count.

Treat these figures as indicative and as an upper bound on the CPU cost. The two runs used slightly different SMC builds, so part of the increase reflects changes unrelated to tracing. Actual overhead also depends on the traffic mix and the sampler.

Set the service name

The service.name resource attribute identifies the SMC instance in the trace backend. The chart defaults it to the chart fullname. Set tracing.serviceName when several SMC deployments export to the same backend and the fullnames do not distinguish them:

yaml

Advanced settings

Use tracing.extraEnv for OpenTelemetry SDK settings without a first-class chart parameter. The chart applies the variables verbatim. Two examples:

yaml

For the full list of supported variables, see the OpenTelemetry Erlang SDK documentationOpens in a new tab.

Verify that traces arrive

  1. Confirm the environment of the SMC container:

    bash

    The output must contain OTEL_EXPORTER_OTLP_ENDPOINT with the configured endpoint and must not contain OTEL_SDK_DISABLED.

  2. Generate signaling traffic, for example by attaching a test subscriber.

  3. Search the trace backend for the service name. In Grafana, open Explore, select Traces in the data source picker, and query for service.name equal to the configured tracing.serviceName. Spans named gtpc.<message_type> appear for each sampled inbound GTP-C request. Mind the known Grafana trace-search issues described in Troubleshooting with traces.

If no traces appear, check the SMC logs for OTLP export errors and confirm that the collector endpoint is reachable from the pod network.

Disable tracing

Set tracing.enabled to false and upgrade the release. The chart then sets OTEL_SDK_DISABLED=true on the SMC container and SMC emits no trace data.