OpenTelemetry Integration
Built-in observability with comprehensive tracing and metrics.
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 spanawait flow.do('process transaction', async ({ span }) => {span.setAttribute('payment.amount', flow.params.amount);
await processTransaction(flow.params);
});});// Note: While the SDK re-exports OpenTelemetry API components,// collecting and exporting metrics requires integrating with an// OpenTelemetry collector and backend system separately.// See OpenTelemetry documentation for setup details.
// Example placeholder - actual implementation depends on OTel setupimport { metrics } from '@identity-flow/sdk/telemetry';
// Placeholder: Define a counter (requires OTel setup)/*const counter = metrics.createCounter('workflow_executions_total', { description: 'Total number of workflow executions'});*/
export default defineWorkflow( { name: 'monitored-process' }, async (flow) => { // Placeholder: Increment the counter (requires OTel setup) // counter.add(1, { workflow: flow.definition.name }); flow.log('Running monitored process...'); // ... workflow implementation });Key Observability Benefits:
This integration empowers you to monitor, debug, and optimize your automated processes effectively.
Learn more about Observability in our Deep Dive section.