Data Flow
Auto-Instrumentation
All three SDKs initialize OpenTelemetry automatically when you call
registerWorker() / register_worker() with an otel config. A manual init_otel() is also available but is not required for typical usage.OTEL_ENABLED=false or pass the option directly:
Configuration
- Node / TypeScript
- Python
- Rust
Traces
Every function invocation creates a span automatically. Cross-worker calls propagate trace context viatraceparent and baggage headers, so a single request that fans out across multiple workers appears as a unified trace.
Custom Spans
UsewithSpan to create custom spans within a function handler:
- Node / TypeScript
- Python
- Rust
Metrics
Worker metrics (CPU, memory, event loop latency) are reported viaWorkerMetricsCollector. Metrics reporting is enabled by default through the enableMetricsReporting: true option.
- Node / TypeScript
- Python
- Rust
Invocation metrics (
iii.invocations.total, iii.invocation.duration, iii.invocation.errors.total) are collected by the iii Engine, not by the worker SDKs. They are available regardless of which SDK language you use.Logs
Subscribe to OpenTelemetry log events from the engine usingonLog(). Logs include severity level, body text, and resource attributes.
- Node / TypeScript
- Python
- Rust
Telemetry Utilities
Theiii-sdk/telemetry subpath (Node.js) and iii.telemetry module (Python) export the following utilities:
Python imports
Cross-SDK Comparison
Environment Variables
Configure OpenTelemetry without code changes using standard OTel environment variables:Programmatic configuration passed to
registerWorker() / register_worker() via OtelConfig takes precedence over environment variables. Environment variables take precedence over defaults.Next Steps
Deployment
Production deployment with observability infrastructure