tracing

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(handler http.Handler) http.Handler

Middleware returns a new HTTP handler that will trace all requests with the HTTP method and path as the span name.

func Transport

func Transport(rt http.RoundTripper) http.RoundTripper

Transport wraps the provided http.RoundTripper with one that starts a span and injects the span context into the outbound request headers. If the provided http.RoundTripper is nil, http.DefaultTransport will be used as the base http.RoundTripper.

Types

type Manager

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

Manager is capable of building, (re)installing and shutting down the tracer provider.

func NewManager

func NewManager(logger *slog.Logger) *Manager

NewManager creates a new tracing manager.

func (*Manager) ApplyConfig

func (m *Manager) ApplyConfig(cfg *config.Config) error

ApplyConfig takes care of refreshing the tracing configuration by shutting down the current tracer provider (if any is registered) and installing a new one.

func (*Manager) Run

func (m *Manager) Run()

Run starts the tracing manager. It registers the global text map propagator and error handler. It is blocking.

func (*Manager) Stop

func (m *Manager) Stop()

Stop gracefully shuts down the tracer provider and stops the tracing manager.

Jump to

Keyboard shortcuts

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