Local Observability
Configure observability hooks when creating a flow:Available Hooks
Flow-Level Hooks
Step-Level Hooks
Consensus Hooks
Batch/forEach Hooks
Provider-Level Hooks
Cloud Observability
Send execution events to the Doclo Cloud dashboard for monitoring and analytics.Using createCloudObservability
Configuration Options
Transport Modes
Stream Mode (Default)
Events are sent periodically during execution for real-time dashboard updates:flushIntervalMs: 0 for immediate per-event sending:
Batch-at-End Mode
Events are collected and sent only whenflush() is called:
Privacy Controls
Control what data is sent to the cloud:Error Handling
Handle dropped events and transport errors:Metrics
Every flow execution returns aggregated metrics:Distributed Tracing
The SDK supports W3C trace context for distributed tracing:Propagating Trace Context
Pass trace context from upstream services:Combining Local and Cloud
Use both local logging and cloud observability:Next Steps
Hybrid Client
Local execution with cloud observability
Error Handling
Handle failures gracefully