Skip to main content
Temporal is a durable execution platform for building reliable distributed applications. Braintrust traces Temporal workflow and activity executions, linking activities to their parent workflows and propagating trace context across workers.

Setup

Install the Braintrust Temporal integration alongside the Temporal SDK packages.
Temporal integration requires TypeScript SDK v2.1.0+.

Manual instrumentation

To trace Temporal workflows and activities, attach BraintrustTemporalPlugin to both your Temporal Client and Worker. Create a single plugin instance and pass it to each via the plugins option so spans propagate across process boundaries.

What Braintrust traces

Braintrust captures:
  • Workflow execution spans (temporal.workflow.<workflow_type>), with workflow type, ID, and run ID in metadata, and errors on failure.
  • Activity execution spans (temporal.activity.<activity_type>), with activity type and ID, parent workflow ID and run ID in metadata, the activity result as output, and errors on failure.
  • Trace context propagated across workers via Temporal headers, including to activities, local activities, and child workflows.
  • Parent-child relationships between client calls, workflows, and activities.

Tracing resources