OpenTelemetry
js/opentelemetry.md
Fino includes a full OpenTelemetry implementation covering traces, metrics, logs, OTLP/HTTP JSON export, W3C propagation, and runtime instrumentations for HTTP servers, outgoing fetch, DNS, socket, and TLS. The subsystem is built as ordinary JS modules on top of fino's async context and topic primitives.
Public API boundary
All application-facing imports come from the fino:opentelemetry/* family:
fino:opentelemetry/traces— tracer providers, tracers, spans, active span contextfino:opentelemetry/metrics— meter providers, instruments, observable instrumentsfino:opentelemetry/logs— logger providers, loggers,LogRecordBuilder,SeverityNumberfino:opentelemetry/sdk—OtelSDK, processors, readers, exporters, instrumentations,Resource,Propagation,W3CTraceContextPropagator,Baggage
Modules under internal:opentelemetry/* are implementation details. Never import from them in application code.
How providers work
Providers publish signal records independently of any SDK. A TracerProvider publishes span records as spans are created and ended. A MeterProvider publishes observations when instruments are used. A LoggerProvider publishes log records on each emit. An OtelSDK instance is a consumer: it subscribes to those records when start() is called, then applies sampling, limits, and exporter fan-out.
Providers work whether or not an SDK is installed. Records published before an SDK is attached are not retroactively processed, but no errors occur.
Guide set
The remaining guides in this section cover specific areas in depth:
- Manual Tracing — manual span creation, active span context, nesting, and async propagation
- Metrics — synchronous and observable instruments, collection timing
- Structured Logs —
LogRecordBuilder, severity levels, trace correlation - SDK Setup —
OtelSDKconstructor, lifecycle, processors, readers, sampling - Exporters and CLI Bootstrap —
OTLPHttpJsonExporter, retry behavior, CLI bootstrap via--otlp-endpoint - Context Propagation — W3C
traceparentandbaggage, inject/extract, cross-process context - Runtime Instrumentations — runtime auto-instrumentation for HTTP server, fetch, DNS, socket, TLS