opentelemetry

package
v0.0.0-...-346acf3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpenTelemetryChiMiddleware

func NewOpenTelemetryChiMiddleware() func(http.Handler) http.Handler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL