opentelemetry

package
v1.45.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidConfiguration = errors.New("invalid tracing configuration")
)
View Source
var Module = fx.Options(
	fx.Provide(NewResource),
	fx.Invoke(InitTracing),
	fx.Provide(NewMeterProvider),
	fx.Invoke(runtimeInstrumentation),
)

Functions

func InitTracing

func InitTracing(
	ctx context.Context,
	logger *zap.SugaredLogger,
	lc fx.Lifecycle,
	r *resource.Resource,
	config Configuration,
) error

func NewMeterProvider added in v1.35.0

func NewMeterProvider(
	ctx context.Context,
	r *resource.Resource,
	lc fx.Lifecycle,
	config Configuration,
) (*metric.MeterProvider, error)

func NewResource added in v1.35.0

func NewResource(
	ctx context.Context,
	app metadata.ApplicationMetadata,
) (*resource.Resource, error)

Types

type Configuration

type Configuration struct {
	SampleRate float64
	Push       PushConfiguration
}

type PushConfiguration

type PushConfiguration struct {
	Enabled  bool
	Endpoint string
	APIKey   string
	Insecure bool
}

Jump to

Keyboard shortcuts

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