> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Temporal

> Add the OpenTelemetry SDK to your Temporal worker processes and point it at a Sazabi endpoint to forward worker logs and workflow and activity traces.

[All Temporal integration capabilities](https://docs.sazabi.com/catalogs/integrations/temporal)

## About

Send OpenTelemetry logs and traces from your Temporal worker processes to Sazabi. Add the OpenTelemetry SDK to each Temporal worker and point it at Sazabi. The SDK sends worker logs and telemetry, and Temporal's official OpenTelemetry tracing interceptor sends workflow and activity traces.

## Prerequisites

* A Temporal worker process you can instrument.
* An OpenTelemetry SDK compatible with your worker runtime.
* Your Sazabi intake URL (shown above).

## Set up in the dashboard

**Step 1**

### Instrument each Temporal worker

Add the OpenTelemetry SDK to each Temporal worker runtime and initialize it before the worker starts accepting tasks. Most languages have official OpenTelemetry SDKs available (for example `@opentelemetry/api` for Node.js).

Set the following environment variables so they are present when the worker process starts:

* `OTEL_EXPORTER_OTLP_ENDPOINT` — your intake URL (shown above)
* `OTEL_EXPORTER_OTLP_PROTOCOL` — `http/protobuf`

To capture workflow and activity traces, add Temporal's official OpenTelemetry tracing interceptor to your worker configuration.

**Step 2**

### Redeploy or restart the workers

Redeploy or restart your Temporal workers so they pick up the new environment variables and SDK initialization.

**Step 3**

### Hand off the change

Commit these changes on a new branch, push it, and open a pull request. Keep the intake URL and any keys in environment variables or a secret store, and commit only configuration that references them.

## Set up with the CLI

You can also register the Temporal log source with the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) (installed and authenticated — see [CLI reference](https://docs.sazabi.com/reference/cli/log-sources.md)).

Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):

```bash theme={"system"}
sazabi log-sources create temporal --mode manual
```

The command prints the intake URL for the new source — copy the whole URL and point your sender at it using the configuration shown above. Run `sazabi log-sources get <log-source-id>` at any time to reprint the endpoint, or `sazabi log-sources list` to see every log source in the project.

## Verify

Run a Temporal workflow or activity to generate fresh telemetry. Open the [Intake page](https://docs.sazabi.com/guides/instrument/intake.md) in the Sazabi dashboard and confirm logs and traces from the **Temporal** source appear. Records typically arrive within a minute or two of the run.

## Troubleshooting

**No telemetry after redeploying workers** — Confirm `OTEL_EXPORTER_OTLP_ENDPOINT` is set in the worker process environment, not only at build time. Check the worker logs for OpenTelemetry SDK initialization errors.

**Traces appear but workflow/activity spans are absent** — Workflow and activity spans require Temporal's official OpenTelemetry tracing interceptor to be registered in the worker configuration. The base SDK alone does not produce Temporal span data.

**Worker metrics are not stored** — Temporal worker metrics (`temporal_workflow_task_execution_latency`, `temporal_worker_task_slots_available`, etc.) are configured separately on the Temporal SDK runtime and are not stored by this log source.

## Further reading

> [card] [Intake](https://docs.sazabi.com/guides/instrument/intake.md)
>
> See per-source ingestion volume and health in the Intake page.

> [card] [Instrument](https://docs.sazabi.com/guides/instrument.md)
>
> Learn how to send data to Sazabi.

> [card] [Log sources](https://docs.sazabi.com/catalogs/log-sources.md)
>
> Browse the full log source catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.