Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOpenTelemetryChiMiddleware ¶
Returns a opentelemetry middleware meant to be used with the chi.Router.
func SetupOpenTelemetry ¶
func SetupOpenTelemetry(ctx context.Context, projectID string) (shutdown func(context.Context) error, err error)
Instruments the application with OpenTelemetry and exports OTLP for metrics and traces. It uses log/slog for logging, and writes logs to stdout. The application does not include any GCP dependencies, and instead only uses open standards for instrumentation. The OpenTelemetry collector is used to route telemetry to GCP. Afterwards, metrics, tracing, logging, and context propagation will be setup.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.