obs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package obs provides OpenTelemetry SDK setup, propagation, and shutdown for paper-board services.

SetupOTel initialises a TracerProvider + MeterProvider via OTLP/HTTP exporters (endpoint from OTEL_EXPORTER_OTLP_ENDPOINT). W3C TraceContext + Baggage propagators are registered globally. Resource attributes attach service.name / service.version / service.namespace=paper-board.

When OTEL_EXPORTER_OTLP_ENDPOINT is unset, SetupOTel installs only the W3C propagator and returns a no-op Shutdown — services can boot without an OTel collector available.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shutdown

type Shutdown func(context.Context) error

Shutdown is returned by SetupOTel; callers MUST defer it.

func SetupOTel

func SetupOTel(serviceName, version string) (Shutdown, error)

SetupOTel initialises the global tracer + meter providers and propagators. Endpoint format: host:port (no scheme). Set OTEL_EXPORTER_OTLP_INSECURE=true for plain HTTP (dev clusters); leave unset for TLS.

Jump to

Keyboard shortcuts

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