tracer

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

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