opentelemetry

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoUrl = errors.New("no collector url")

Functions

This section is empty.

Types

type Provider

type Provider struct {
	TraceProvider *sdktrace.TracerProvider
	MeterProvider *sdkmetric.MeterProvider
	ServiceName   string
	// contains filtered or unexported fields
}

Provider is an opinionated client to quickly instrument an application via OpenTelemetry.

func NewProvider

func NewProvider(ctx context.Context, serviceName string, collectorUrl string) (*Provider, error)

func (*Provider) Shutdown

func (p *Provider) Shutdown(ctx context.Context) error

Shutdown cleans up all open resources.

Can also be called on a nil Provider, in that case it is a NoOp.

Jump to

Keyboard shortcuts

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