This page uses Temporal’s OpenTelemetry support plus OpenInference LLM instrumentation. It is not a Temporal-specific OpenInference instrumentor.
Prerequisites
- Python 3.9+
- A Temporal Python application
- An Arize AX account (sign up)
- Your Arize AX Space ID and API Key
Launch Arize AX
- Sign in to your Arize AX account.
- From Space Settings, copy your Space ID and API Key. You will set them as
ARIZE_SPACE_IDandARIZE_API_KEYbelow.
Install
Configure credentials
Setup tracing
Configure Arize AX as the OpenTelemetry exporter and enable the OpenInference OpenAI instrumentor before Temporal client and worker code runs. Use Temporal’s replay-safe tracer provider so workflow spans use deterministic IDs and are not exported again when Temporal replays workflow code:Add Temporal OpenTelemetry tracing
Register Temporal’s OpenTelemetry plugin when creating the Temporal client:Put LLM calls in activities
Temporal workflow code must stay deterministic. Put network I/O, including LLM calls, in activities:Verify in Arize
- Run a workflow that executes an activity with an LLM call.
- Open your Arize AX space and select project
temporal-tracing-example. - You should see Temporal workflow/activity spans and OpenInference LLM spans in the trace.
Check from the skill, CLI, or SDK
Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.- Arize skill (agent)
- AX CLI
- SDK
Install the Arize Skills plugin and let your coding agent check for you:Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.
What Arize captures
- Temporal workflow, activity, and client-call spans from Temporal’s OpenTelemetry plugin
- OpenInference LLM spans for SDK calls made inside activities
- Errors, retries, latency, and parent-child relationships when context is propagated correctly
Troubleshooting
- LLM spans are not nested under activities. Ensure the LLM call runs inside the activity execution and that both Temporal and OpenInference use the same tracer provider.
- Duplicate or surprising workflow spans. Temporal may replay workflow code. Keep I/O and LLM calls in activities, not workflow methods.
- No traces in Arize. Confirm the tracing setup runs before the Temporal client and worker are created, and that the exporter endpoint and Arize headers are set.