Documentation
¶
Overview ¶
Package otel provides lightweight OpenTelemetry setup for pi-go, driven entirely by environment variables sourced from ~/.pi-go/.env so secrets never appear in the process environment.
The following env vars are consumed:
EL_SERVICE_NAME defaults to "pi-go" OTEL_EXPORTER_OTLP_ENDPOINT collector endpoint (e.g. https://collector:4317) OTEL_EXPORTER_OTLP_PROTOCOL "grpc" or "http" (default) OTEL_TRACES_EXPORTER "otlp" (default), "console", or "none"
If no exporter is configured, tracing is a no-op (tracer returns no-op spans).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeBool ¶
AttributeBool returns a bool attribute key-value pair.
func AttributeInt ¶
AttributeInt returns an int attribute key-value pair.
func AttributeString ¶
AttributeString returns a string attribute key-value pair.
func IsEnabled ¶
func IsEnabled() bool
IsEnabled returns true when OTEL tracing is active (exporter is set and not "none"/"").
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.