Temporal tracing with OpenTelemetry

Temporal's OpenTelemetry integration links clients, workers, activities and Nexus operations into one trace. This page covers how to set it up, export traces to your existing backend and secure the pipeline.

On this page

Temporal tracing with OpenTelemetry for long-running workflows

A plain request trace breaks at every handoff when a Temporal workflow runs for hours or days across several workers. A workflow task may run on one worker, an activity on another, and a retry weeks later on a third. Without deliberate propagation, each segment appears as a disconnected fragment, and the operator cannot see which upstream request started the work or where a delay accumulated. The supported method is the Temporal SDK OpenTelemetry integration, which instruments clients, workflows, activities and Nexus operations and propagates trace context across workers so that the whole execution stays in one connected trace. For the Go SDK, the setup is documented in the Temporal Go SDK OpenTelemetry integration. Your team should confirm the integration and SDK version it targets against the current Temporal SDK release notes before writing instrumentation code, because the plugin configuration differs between SDK languages.

OpenTelemetry is an observability framework for generating, exporting and collecting traces, metrics and logs. It is vendor- and tool-agnostic and is not an observability backend, so storage and visualization are handled by a separate system. The practical design is to have the SDK export spans to an OpenTelemetry Collector that your organization already operates or plans to run, and let the Collector forward them to the tracing backend your teams already use. The Collector can run as an agent beside workers or as a gateway that receives data from many sources. Decide early which Collector topology fits your network zones, and confirm that your existing backend accepts OTLP or has a supported exporter. Trace data also carries workflow IDs, activity names and sometimes input details, so review what attributes the SDK emits against your data handling rules before enabling export in production.

What you need before enabling Temporal tracing

Tracing a Temporal workflow end to end depends on a few components lining up: the Temporal Server, the SDK that carries trace context, a Collector and a backend that accepts OTLP. Settle these decisions before you change worker code, because each one decides where spans go and who can read them.

Temporal Server version and deployment method

Record the Temporal Server version you run and how it is deployed: Docker Compose, Go binaries, the Helm chart or a custom Go build. The latest published server line is v1.32.1, with patch releases v1.31.4 and v1.30.8 for earlier minor lines. Move to the latest patch of your current minor before you add tracing, so that any issue you hit is not a known server defect. Helm chart versions below 0.73.1 do not work with server images 1.30 and later.

Deployment docs

SDK language and tracing integration version

Identify the Temporal SDK language your clients, workflows and activities use, and the SDK version that ships the OpenTelemetry integration. The integration covers clients, workflows, activities and Nexus operations, so every worker and client service in the chain needs a compatible version. Confirm SDK version support for your language in the Temporal documentation before you plan the upgrade, since the integration setup differs between SDKs.

Go OpenTelemetry guide

Existing trace backend that accepts OTLP

Confirm that your current tracing backend can receive OpenTelemetry Protocol data, either directly or through a Collector. OpenTelemetry does not store or visualize traces itself, so the backend is a separate decision. Check the retention period, sampling behavior and whether it can display long-running traces that span many hours or days, since Temporal workflows often do.

Pinned OpenTelemetry Collector release

Pin one Collector release for the tracing path and record the image or binary checksum you deploy. The current release line is v0.163.0, published October 16, 2026, and releases ship signed artifacts, SHA256 checksums and SBOM files you can verify. Check each component's stability level in its README, because core components have mixed stability. Choose the contrib distribution only if it contains the receivers and exporters you need.

Collector releases

Network paths from workers to the Collector

Map the network route from every Temporal worker and client host to the Collector, and from the Collector to the backend. Temporal services are documented to run on hosts not reachable from the public internet, so the Collector should sit on the internal network with only the required ports open. Decide whether workers send directly to the Collector as an agent or through a gateway shared by several services, and test that spans arrive before rolling out to production workers.

Self-hosted security docs

Temporal Cloud or self-hosted reporting decision

Decide whether the Temporal Service that runs your workflows is self-hosted or Temporal Cloud, because this changes what you can instrument and where the export path starts. Self-hosted services report from infrastructure you operate, while Temporal Cloud is a managed service with its own pricing and support tiers. Ask the Temporal team which trace features apply to your chosen deployment before you design the pipeline.

Temporal Cloud pricing

How to configure tracing from SDK to backend

This sequence connects Temporal clients, workers and the Collector to your existing tracing backend, so one workflow shows up as a single trace that survives worker restarts. Each step ends with a check you can run before moving on.

  1. Confirm the SDK integration for your language

    Start by checking which OpenTelemetry integration your Temporal SDK provides and which version it targets. The Go SDK documents its OpenTelemetry integration as a separate page, and the integration covers clients, workflows, activities and Nexus operations. Your platform team and the application team should agree on the SDK version in the repository before any code changes. The step is done when the team can name the integration page for each language in use and the SDK version that will be pinned.

  2. Add the tracer provider and propagator

    In the client and worker startup code, create an OpenTelemetry tracer provider and register a propagator so trace context can move between processes. Set the service name and resource attributes so each process can be told apart in the backend. Keep the exporter configuration out of application code where possible, so the endpoint can change without a rebuild. The step is done when a unit or startup test shows a tracer provider is registered and the propagator is set in both the client and the worker.

  3. Enable the Temporal tracing plugin

    Attach the Temporal OpenTelemetry plugin or interceptor to the client and to the worker, following the SDK documentation for your language. Once enabled, starting a workflow, running a workflow task, running an activity and calling a Nexus operation should each emit a span. Because the plugin is configured in both places, check that it is not registered twice, which can produce duplicate spans. The step is done when a test workflow run in a development environment produces spans for the client start, the workflow and at least one activity.

  4. Choose the Collector deployment pattern

    Decide whether the Collector runs as an agent next to each worker host or as a gateway that receives data from many services. Agent mode keeps the local hop short, while gateway mode gives one place to change export settings and credentials. Many teams use both, with agents forwarding to a gateway. Confirm the choice with the team that operates the existing backend. The step is done when a written diagram names each Collector role, the hosts it runs on and the network paths that must be opened.

  5. Configure the OTLP receiver and exporter

    Configure the Collector with an OTLP receiver for incoming spans from the SDKs and an exporter that sends traces to the existing backend. Use the component documentation for the exporter and check each component's stability level in its README before relying on it in production. If the backend requires authentication, consider an authenticator extension for the receiver or the oauth2client extension for outgoing requests, and keep secrets out of plain configuration files. Follow the Collector configuration best practices for network exposure. The step is done when the Collector starts with a validated configuration and its own logs show the pipeline is running without export errors.

  6. Point the SDKs at the Collector

    Set the OTLP endpoint in the client and worker environment so spans leave the process and reach the Collector. Confirm that the workers can reach the Collector port and that no outbound firewall rule drops the traffic. Send a single test workflow and watch the Collector's debug or telemetry output to confirm spans arrive from both the client and the worker. The step is done when the Collector shows incoming spans tagged with the expected service names, and the backend lists the same trace.

  7. Verify one connected trace across a worker restart

    Start a workflow that includes a timer or a longer activity, then restart the worker while the workflow is still running. When the workflow resumes on the new worker, open the trace in the backend and confirm that the spans from before and after the restart share one trace identifier and form a single tree. Missing links usually point to a propagator that was not registered or an interceptor missing from one process. The step is done when the team has a saved trace that spans both worker instances and has recorded the result in its runbook.

How trace context survives handoffs between workers

The OpenTelemetry integration in the Temporal SDK carries trace context through the workflow itself, not only through the process that started it. When a client starts a workflow, the trace context is recorded with the work the service schedules, so a workflow task or activity picked up later by a different worker continues the same trace rather than starting a disconnected fragment. This matters most for workflows that run for days or weeks, where the original worker may be gone long before the next step executes. Your job is to confirm which fields travel with each task and how the propagator is configured in your SDK version, using the Temporal Go SDK OpenTelemetry integration page as the reference for your language.

Replay is the part most teams get wrong. A worker that resumes a workflow reruns the workflow code from the recorded event history to rebuild its state, and that rerun is not new work. Replayed workflow code should not produce duplicate spans for steps that already ran, but whether the integration suppresses spans during replay, and how spans for activities are linked back to the workflow, is a detail you must check in the SDK documentation for your language and version. Do not assume the behavior from another SDK. Write a test that runs a workflow through a forced worker restart, then count spans in your backend for a single execution ID.

Plan the verification and the backend before you rely on the trace view during an incident. Confirm that your workers, and any proxy or gateway between them and the Collector, pass the trace headers without dropping them, and that the exporter in each worker points at a Collector or backend your operations team can reach. Ask your SDK vendor or the Temporal community which trace attributes are attached to workflow and activity spans, because those attributes decide whether you can search for a single business transaction across retries. Record these answers in your runbook so that on-call engineers know which trace view to expect after a worker moves.

Collector agent or gateway for Temporal traces

In the agent model, a Collector runs next to each worker group, either as a sidecar container in the same Kubernetes pod or as a process on the same host. Workers send spans to a local endpoint, so the Collector handles batching, retries and light processing close to the source. The OpenTelemetry Collector can run as an agent next to services, and this placement keeps the hop between the worker and the Collector short.

  • Failure isolation: a crash or restart affects only the workers it serves, and a noisy worker cannot starve other services of collector capacity.
  • Configuration ownership: the team that owns the workers usually owns the agent configuration, which speeds changes but multiplies files to keep aligned.
  • Scaling: capacity grows with each worker group, so throughput follows worker count without a separate scaling plan.
  • Resource cost: every agent consumes CPU and memory on the node, which adds up across a large worker fleet.
  • Operational overhead: rolling out a new exporter or credential means changing many agent deployments.

Before relying on this model, confirm the Collector version, the components you need and their stability level in each component's README, and how the agent authenticates to your backend.

Mapping Temporal spans to backend attributes

This table pairs each Temporal concept with the span name or attribute you should expect the backend to index, and a column for what to confirm in the SDK output. Use it as a starting list for a naming agreement with the team that runs the tracing backend, then check every entry against real traces from your chosen language SDK.

Temporal conceptExpected span or attribute to confirmWhy the backend needs it
Workflow IDWorkflow span attribute for the workflow ID, to confirm in SDK outputLets operators find every trace for one business process
Run IDWorkflow run identifier attribute, to confirm in SDK outputSeparates runs when a workflow is reset or continued as new
Workflow typeSpan name for the workflow type, to confirm in SDK outputGroups latency and error rates by workflow definition
Activity typeSpan name for the activity type, to confirm in SDK outputShows which external call is slow or failing inside a workflow
Task queueTask queue attribute on workflow and activity spans, to confirm in SDK outputTies slow spans to worker pools and backlog problems
NamespaceNamespace attribute on client and worker spans, to confirm in SDK outputIsolates tenants or environments in shared backends
Nexus operationOperation span for Nexus calls, to confirm the attribute names in the Go SDK integrationFollows cross-namespace calls that would otherwise break the trace
Attribute namingAgree names with the backend owner before instrumenting, and keep one convention across servicesPrevents duplicate fields and broken dashboards later

Securing the telemetry pipeline

Traces from Temporal reach the Collector, then your backend, and each hop needs its own access and data decisions. The cards below cover authentication on the way in, credentials on the way out, network placement of the Temporal services, and what workflow data is allowed into span attributes.

Authenticate incoming Collector connections

Collector authenticator extensions can check the identity of clients sending telemetry to a receiver, for example with OIDC. Without this, anything that can reach the receiving port can inject spans into your backend. Confirm which receiver and authenticator combinations your Collector build supports, and test that an SDK exporter without a valid token is refused before go-live. Decide which service identities, such as the Temporal worker fleet, are allowed to write traces.

Collector configuration

Authenticate outgoing exporter requests

The oauth2client extension adds credentials to requests the Collector sends to your tracing backend. This keeps backend tokens out of SDK configuration on every worker and lets you rotate them in one place. Check where the client secret is stored, who can read the Collector configuration, and how token expiry is handled when the backend is unavailable.

Keep Temporal services off the public internet

Temporal's deployment guidance says its services should run on hosts that are not reachable from the public internet, with network access limited to trusted internal networks. Apply the same rule to the path that carries trace data. Place the Collector on the internal network, expose only the ports your workers need, and confirm that the backend endpoint is not published to untrusted networks.

Temporal deployment docs

Keep sensitive payloads out of span attributes

Workflow inputs, activity arguments and results can carry customer records, account numbers or health data. If they are copied into span attributes, the telemetry backend stores them outside your payload controls. Limit attributes to identifiers such as workflow ID, run ID, task queue and activity type. Review SDK instrumentation settings and any custom interceptors before enabling tracing in production.

Redact or handle payloads with the codec

If a team needs payload detail in traces, handle it deliberately. Redact fields in the Collector with processors before export, or ensure that any value recorded has passed through the same encryption and access rules that apply to the workflow payloads themselves. Ask your Temporal and security owners to document which fields are allowed, and test redaction with real sample workflows rather than assumed field names.

Check the Collector configuration against best practices

The OpenTelemetry configuration best practices cover securing receivers, exporters and extensions, which is the reference to work through before production. Review the configuration as code, pin the Collector release you test, and record which components have mixed stability levels. Set up review so that changes to receivers, exporters or processors get the same sign-off as application changes.

Config best practices

How spans flow from workers to your backend

Spans start in the Temporal client and worker SDKs, where the OpenTelemetry integration creates them for clients, workflows, activities and Nexus operations. The Temporal Server sits alongside, carrying the workflow and task queue activity that links those spans into one trace. Spans then leave the internal network through a Collector in agent or gateway mode, where an authenticator extension checks the connection before export. Check that trace context survives each hand-off and that the backend is reachable only through the Collector.

Trace context moves from SDK to Server to Collector, then to your existing backend across the trust boundary.

Why Temporal traces break or go missing

This table lists the failures teams most often hit when tracing Temporal with OpenTelemetry, with the likely cause and the fix for each. Read it as a checklist to run through when a trace is fragmented, a span is absent, or telemetry never reaches the backend. Most of the fixes sit in SDK setup, version alignment and Collector receiver and exporter configuration, so confirm each against your own deployment.

SymptomLikely causeFix
Trace fragments after a worker restartTrace context was not carried through the workflow history, or the worker started without the same OpenTelemetry setup as before the restartUse the Temporal SDK OpenTelemetry integration on every worker build, keep tracer configuration identical across replicas, and confirm one trace ID survives a controlled restart in a test namespace
Activity spans missingThe OpenTelemetry plugin or interceptor is not registered on the worker, so activities run without instrumentationRegister the integration in the worker client options for each task queue, then run a sample workflow and check that activity spans appear under the workflow span
Collector exporter rejected by the backendWrong endpoint, protocol (gRPC or HTTP) or missing authentication header in the exporter block, or a backend tenant or API key mismatchCheck the exporter endpoint and protocol against the backend documentation, add the required headers or authentication extension, and read the Collector logs for the rejection code
Mismatched SDK and Collector versionsTelemetry SDK, Temporal SDK integration and Collector were upgraded at different times, so exported fields or protocol details differPin the Collector release you run, confirm the SDK versions your Temporal SDK integration documents as compatible, and upgrade them together in a test environment first
Unauthenticated receiver rejectionsThe Collector receiver requires authentication, or workers send traces without the credentials the receiver expectsConfigure an authenticator extension such as OIDC on the receiver, give workers a credential source, and restrict receiver access to the internal network
High span volume from long-running workflowsEvery workflow, activity and retry produces spans, and long-lived or high-throughput workflows multiply themSample traces at the SDK or Collector, drop or reduce noisy attributes, set retention in the backend, and size the Collector pipeline with a load test before production
Traces show gaps across Nexus operationsInstrumentation is present on one side of a Nexus call but not the other, or the caller and handler run with different tracing setupConfirm the integration runs on both the calling and handling services, then check the trace in the backend for a shared parent

Questions buyers ask before tracing Temporal

How much does it cost to add OpenTelemetry tracing to Temporal?

The cost is driven by the work and the backend, not by a list price, and DeployOpen does not publish figures. Your own engineering time is one cost, and it recurs when workflows or activities are added. Your trace backend is a second cost, and its licensing or hosting usually scales with span volume. The main drivers are the number of workflows and activities you run, the span volume each one produces, how many Collectors you operate, and what your backend charges for ingestion and retention. Ask any partner for a quote built from a written scope that lists these counts, and ask which costs are one-time and which recur.

How long does a Temporal tracing rollout take?

Duration depends on how many Temporal applications you have, how many already emit telemetry, and whether your trace backend is already in place. A single service with an existing OpenTelemetry pipeline usually takes far less time than a fleet of workers across several teams. The work breaks into SDK plugin setup for clients, workers and activities, Collector configuration, verification that spans join across a long-running workflow, and handover. Treat any duration as something to confirm in the written scope rather than assume from this page.

What does the client team need to provide for the work?

You need named owners for the Temporal workers, the existing trace backend and the Collector hosts, plus access to the code repositories and a non-production environment where traces can be checked. Your platform team should confirm how workers are deployed and where the Collector will run, either as an agent beside services or as a gateway that accepts data from many sources. Security and compliance staff should review what attributes end up in spans, because workflow inputs and identifiers can carry sensitive data.

Can our own team implement Temporal tracing without a partner?

Yes, a team that already runs Temporal workers and an OpenTelemetry pipeline can often do this in-house, provided it has the engineering time and someone who understands both systems. The hard parts are consistent instrumentation across clients, workflows, activities and Nexus operations, and checking that trace context survives worker restarts and retries. A partner is most useful when several teams need the same pattern, when the backend is unfamiliar, or when you want an independent review before production. Decide based on your capacity and the skills on the team, not on the tool alone.

How does tracing differ between self-hosted Temporal and Temporal Cloud?

The instrumentation in your code is the same, because the OpenTelemetry integration sits in the SDK and worker processes you run. What changes is where the Collector and backend live and who operates the Temporal side. With self-hosted Temporal, you also control the Temporal Service, its network path to the Collector and the retention of any telemetry you export. With Temporal Cloud, the service is managed by Temporal Technologies, so your planning focuses on your workers, network connectivity and the Collector endpoint. Confirm the exact export path for your deployment before you design the pipeline.

Does the instability of some Collector components affect the plan?

Yes. Core OpenTelemetry Collector components have mixed stability levels, and each component's README states its status. A component still in an early stage may change configuration keys or behavior between releases, so pin versions, read the README for each receiver, processor and exporter you use, and include upgrade testing in the plan. Trace APIs and SDKs are stable in most languages, which lowers risk on the application side, but the pipeline between them still needs the same checks.

Which Collector release should we plan around?

Pick a release line deliberately and record it in your plan, rather than taking the newest build by default. OpenTelemetry Collector v0.163.0 was released on October 16, 2026, after v0.162.0 on September 29 and v0.161.0 on September 16, 2026. Releases ship the contrib distribution with signed artifacts, SHA256 checksums and SBOM files, which your security team can use to verify what you deploy. Ask your partner or internal owner how they will test each upgrade in a non-production environment before it reaches the Collector fleet.

How should we secure the Collector that receives Temporal traces?

Plan authentication on both sides of the Collector before it carries production traffic. Authenticator extensions can check incoming connections on receivers, for example with OIDC, and add credentials to outgoing exporter requests, for example with the oauth2client extension. Also review the configuration best practices for the Collector and decide which span attributes are allowed out of your workers. Confirm these controls against your own security policy and the behavior of the specific Collector version you deploy.

How DeployOpen scopes and delivers Temporal tracing

DeployOpen plans and implements OpenTelemetry tracing for Temporal inside infrastructure you control, so workflow, activity and Nexus operation spans stay connected across workers. Work is agreed as a fixed scope, with the trace backend, sampling and handover defined before any configuration changes.

How we scope

  • We inventory Temporal clients, workers, task queues and Nexus operations that need trace coverage
  • We confirm your existing tracing backend, its ingest path and how teams query traces today
  • We agree sampling, attribute and retention rules, and which payload data must stay out of spans
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts

How we build

  • We enable the SDK OpenTelemetry integration in each worker and client and verify context propagation
  • We design Collector pipelines with receivers, processors and exporters matched to your backend
  • We configure Collector authentication for incoming and outgoing connections where your policy requires it
  • We test a long-running workflow end to end, including retries, timers and child workflows

How we hand over

  • We document the instrumentation, Collector configuration and trace naming conventions for your teams
  • We record the versions of the Temporal SDKs, Temporal Server and Collector deployed, with the reasons for each choice
  • We run a walkthrough with your platform and on-call engineers covering how to find a failing workflow's trace
  • We provide a retest checklist so your team can confirm propagation after SDK or Collector upgrades

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers
  • We can review Collector release notes and component stability before each upgrade you approve
  • We can repeat propagation tests after changes to workers, SDK versions or exporter settings
  • Retainer scope, response expectations and review cadence are agreed in writing before work starts

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.