createOpenTelemetryObserver
Purpose and behavior
Section titled “Purpose and behavior”Create OpenTelemetry instrumentation from your tracer and meter. Attach its sink to the hub you pass as observation for parented workflow, task, dispatch and operation spans, or pass the observer as telemetry to workflow.start() or dispatch(). Instrumentation errors go to onError; close() ends open spans without flushing or shutting down the SDK.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredOpenTelemetryOptionsInjected tracer, meter and isolated error callback for workflow and dispatch telemetry.options.tracerRequiredTracerOpenTelemetry tracer used to create execution spans.options.meterRequiredMeterOpenTelemetry meter for Outpost execution counters, duration histograms and token counters (outpost.workflow., outpost.task., outpost.dispatch.*, outpost.agent.tokens).options.onErrorOptional((error: unknown) => void) | undefinedReceives errors thrown by the tracer or meter while recording workflows and dispatches; they never change a run’s outcome. Errors thrown by onError are ignored.