@ai-sdk/workflow@2.0.94 Adds Enhanced Telemetry and Durable Context Hooks
The latest update to @ai-sdk/workflow introduces improved telemetry support for durable WorkflowAgent runs, experimental context hooks for integrations, and OpenTelemetry compatibility enhancements.
What changed?
@ai-sdk/workflow version 2.0.94 introduces a single telemetry operation for durable WorkflowAgent runs, capturing the workflow's prompt, final output, steps, and tools. Workflow events are now reported with original timestamps upon workflow completion or suspension. The release includes explicit bridging for OpenTelemetry. Developers are required to pass the same OpenTelemetryIdGenerator instance for the tracer provider's idGenerator, sampler, and as an argument to the OpenTelemetry constructor with { durable } enabled. Experimental typed durable context hooks are also available for deeper telemetry integrations. The dependency on process-global ID-generator detection has been removed.
Why does it matter to an everyday developer?
Telemetry is crucial for debugging and monitoring AI-powered workflows. By grouping an entire durable WorkflowAgent run into a single telemetry operation, developers gain complete visibility of the workflow's progress, errors, and results—including prompts and tool calls. This update removes ambiguity from fragmented traces, enabling simpler performance analysis and troubleshooting. OpenTelemetry compatibility allows for standardized monitoring within existing observability stacks, and the new context hooks enable advanced custom telemetry integrations. The change also improves trace reliability by eliminating reliance on process-global ID generators.
What can the developer do now?
Developers integrating durable WorkflowAgent runs with telemetry should update to @ai-sdk/workflow@2.0.94. They should ensure that their OpenTelemetry setup uses the same OpenTelemetryIdGenerator throughout their tracing configuration and explicitly pass it when enabling durable mode. Developers can also experiment with the new durable context hooks for custom monitoring or logging needs. Existing per-model live tracing continues to work without adopting the new bridge.
