Skip to content

OpenTelemetry Integration

OpenTelemetry Integration

Built-in observability with comprehensive tracing and metrics.

IdentityFlow integrates seamlessly with OpenTelemetry, the industry standard for observability, providing deep insights into your workflow executions.

export default defineWorkflow('payment processing', async (flow) => {
// Each step automatically creates a span
await flow.do('validate payment', async () => {
// Custom attributes are automatically added
await validatePayment(flow.params);
});
// Manual instrumentation with destructured span
await flow.do('process transaction', async ({ span }) => {
span.setAttribute('payment.amount', flow.params.amount);
await processTransaction(flow.params);
});
});

Key Observability Benefits:

  • Distributed Tracing: Understand the entire lifecycle of a workflow, even as it interacts with other services.
  • Performance Monitoring: Identify bottlenecks and optimize workflow performance with detailed span data.
  • Error Diagnostics: Quickly pinpoint where and why errors occur within your workflows.
  • Metrics Collection: (Requires separate OTel collector setup) Gather quantitative data about workflow executions, durations, and custom business metrics.

This integration empowers you to monitor, debug, and optimize your automated processes effectively.

Learn more about Observability in our Deep Dive section.