Documentation
¶
Overview ¶
Package tracing wires the OpenTelemetry SDK and exposes a small HTTP-middleware helper. When tracing is disabled, all helpers are no-ops so callers don't need to branch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init constructs the tracer provider per cfg and installs it as the global OTel provider. Returns a shutdown function the caller invokes on exit. When cfg.Enabled is false, returns a no-op shutdown.
func Middleware ¶
Middleware returns HTTP middleware that emits one span per request, linking it to the request_id when present.
Types ¶
Click to show internal directories.
Click to hide internal directories.