tracing

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package tracing configures OpenTelemetry provider lifecycle for the API process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service owns tracer construction and shutdown for the process.

func New

func New(ctx context.Context, cfg config.TracingConfig, env string) (*Service, error)

New configures OpenTelemetry tracing and installs global providers.

func NewWithProvider

func NewWithProvider(provider trace.TracerProvider, shutdownFn func(context.Context) error) *Service

NewWithProvider wraps an existing tracer provider in Service API.

func (*Service) Enabled

func (s *Service) Enabled() bool

Enabled reports whether tracing is active.

func (*Service) Shutdown

func (s *Service) Shutdown(ctx context.Context) error

Shutdown flushes telemetry and closes exporter resources.

func (*Service) Tracer

func (s *Service) Tracer() trace.Tracer

Tracer returns the HTTP tracer used by middleware and handlers.

Jump to

Keyboard shortcuts

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