tracing

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestId = attribute.Key("app.request_id")
)

Variables

View Source
var (
	DefaultPropagator Propagator     = propagation.TraceContext{}
	DefaultProvider   TracerProvider = NewNoopProvider()
)

Functions

func IsNoop

func IsNoop(provider TracerProvider) bool

Types

type Config

type Config struct {
	Enable        bool
	Address       string
	ModuleName    string
	ModuleVersion string
	Environment   string
	InstanceId    string
	Attributes    map[string]string
}

type NoopProvider

type NoopProvider struct {
	Provider
}

func NewNoopProvider

func NewNoopProvider() NoopProvider

func (NoopProvider) Shutdown

func (n NoopProvider) Shutdown(ctx context.Context) error

func (NoopProvider) Tracer

func (n NoopProvider) Tracer(name string, options ...trace.TracerOption) trace.Tracer

type Propagator

type Propagator = propagation.TextMapPropagator

type Provider

type Provider interface {
	TracerProvider
	Shutdown(ctx context.Context) error
}

func NewProviderFromConfiguration

func NewProviderFromConfiguration(ctx context.Context, logger log.Logger, config Config) (Provider, error)

type TracerProvider

type TracerProvider = traceapi.TracerProvider

Jump to

Keyboard shortcuts

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