Skip to main content
Temporal is a durable execution platform for long-running workflows. Temporal’s Python SDK can emit OpenTelemetry spans for workflow and activity execution. Send those spans to Arize AX, then use OpenInference instrumentors inside activities to capture LLM calls in the same trace.
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

  1. Sign in to your Arize AX account.
  2. From Space Settings, copy your Space ID and API Key. You will set them as ARIZE_SPACE_ID and ARIZE_API_KEY below.

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:
For EU spaces, change the exporter endpoint to:

Add Temporal OpenTelemetry tracing

Register Temporal’s OpenTelemetry plugin when creating the Temporal client:
With the plugin installed, Temporal creates spans for client calls, workflows, and activities, and propagates trace context across client, workflow, and activity boundaries. OpenAI calls made inside activities are captured by OpenInference and nest under the active Temporal span when they share the same OpenTelemetry context.

Put LLM calls in activities

Temporal workflow code must stay deterministic. Put network I/O, including LLM calls, in activities:

Verify in Arize

  1. Run a workflow that executes an activity with an LLM call.
  2. Open your Arize AX space and select project temporal-tracing-example.
  3. 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.
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.

Resources

Temporal Python observability

OpenInference OpenAI Instrumentor

OpenTelemetry context propagation