tracing

package
v0.0.0-...-9225271 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package tracing installs OpenTelemetry globals (tracer provider, propagators) for OTLP export.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, cfg Config) (shutdown func(context.Context) error, err error)

Install configures the global TracerProvider and text map propagator. If cfg.OTLPEndpoint is empty, it returns (nil, nil) and leaves OTel defaults (noop) in place.

Types

type Config

type Config struct {
	ServiceName    string
	ServiceVersion string
	OTLPEndpoint   string
	Insecure       bool
	SampleRatio    float64
}

Config controls OTLP export. Endpoint is the gRPC host:port (no scheme), e.g. "localhost:4317" or "tempo:4317".

Jump to

Keyboard shortcuts

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