telemetry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package telemetry provides OpenTelemetry tracing initialization for squad.

When an OTLP endpoint is configured (via --otel-endpoint flag or the OTEL_EXPORTER_OTLP_ENDPOINT env var), traces are exported over OTLP/HTTP. When no endpoint is set, a no-op tracer is used and there is zero overhead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, serviceName, endpoint string) (shutdown func(context.Context) error, err error)

Init initializes the OpenTelemetry tracer provider with an OTLP HTTP exporter. If endpoint is empty, it falls back to the OTEL_EXPORTER_OTLP_ENDPOINT env var (handled by the SDK). If neither is set, a no-op provider is installed.

The returned shutdown function flushes pending spans and must be called before the process exits.

func Tracer

func Tracer() trace.Tracer

Tracer returns the global tracer for squad instrumentation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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