Documentation
¶
Overview ¶
Package otel wires the reference observability stack (tech baseline §15): OTLP trace/metric/log exporters configured through the standard OTEL_* environment variables, plus a bounded async slog → OTel log bridge. Without an OTLP endpoint the providers stay no-ops, so every binary can initialize unconditionally and only emit telemetry when the reference stack is up.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Shutdown ¶
Shutdown flushes and closes all exporters.
func Init ¶
Init configures the global tracer/meter/logger providers from the standard environment:
OTEL_EXPORTER_OTLP_ENDPOINT OTLP/gRPC endpoint (e.g. 127.0.0.1:4317) OTEL_SERVICE_NAME service name (default: fenced) OTEL_SDK_DISABLED set to disable telemetry entirely
When the endpoint is unset the providers remain the SDK no-ops and slog keeps its console handler; the returned shutdown is then a no-op.