tracer

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address     string
	Insecure    bool
	Username    string
	Password    string
	Probability float64
	ServiceName string
}

Config holds the tracing configuration.

type OTLP added in v1.10.0

type OTLP struct {
	embedded.Tracer
	// contains filtered or unexported fields
}

OTLP is an extension of otel tracer to add custom logging.

func (*OTLP) Start added in v1.10.0

func (t *OTLP) Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Start returns a new span with the corresponding trace id field filled.

type OTLPProvider added in v1.10.0

type OTLPProvider struct {
	embedded.TracerProvider
	// contains filtered or unexported fields
}

OTLPProvider is a trace provider which exports traces to OTLP.

func NewOTLPProvider added in v1.10.0

func NewOTLPProvider(ctx context.Context, cfg Config) (*OTLPProvider, error)

NewOTLPProvider creates a new OTLPProvider.

func (*OTLPProvider) Stop added in v1.10.0

func (p *OTLPProvider) Stop(ctx context.Context) error

Stop stops the provider once all traces have been uploaded.

func (*OTLPProvider) Tracer added in v1.10.0

func (p *OTLPProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer

Tracer creates a new tracer with the given name and options.

Jump to

Keyboard shortcuts

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