telemetry

package
v0.0.0-...-7756f97 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServiceEnvironment

func ServiceEnvironment(env string) func(*OTELProvider)

func ServiceHostName

func ServiceHostName() func(*OTELProvider)

func ServiceName

func ServiceName(name string) func(*OTELProvider)

func ServiceVersion

func ServiceVersion(version string) func(*OTELProvider)

Types

type NoOpProvider

type NoOpProvider struct{}

func NewNoOpProvider

func NewNoOpProvider(_ *ProviderConfiguration, _ *zap.Logger) *NoOpProvider

func (*NoOpProvider) Meter

func (p *NoOpProvider) Meter() *sdkmeter.MeterProvider

func (*NoOpProvider) Tracer

func (p *NoOpProvider) Tracer() *sdktrace.TracerProvider

type OTELProvider

type OTELProvider struct {
	// contains filtered or unexported fields
}

func NewTelemetryProvider

func NewTelemetryProvider(c *ProviderConfiguration, l *zap.Logger, attributes ...func(*OTELProvider)) *OTELProvider

func (*OTELProvider) Meter

func (p *OTELProvider) Meter() *sdkmeter.MeterProvider

func (*OTELProvider) Tracer

func (p *OTELProvider) Tracer() *sdktrace.TracerProvider

type Options

type Options struct {
	Logger *zap.Logger
}

type Provider

type Provider interface {
	Tracer() *sdktrace.TracerProvider
	Meter() *sdkmeter.MeterProvider
}

type ProviderConfiguration

type ProviderConfiguration struct {
	Port        uint64
	EndpointURL string
}

func (*ProviderConfiguration) Name

func (c *ProviderConfiguration) Name() string

func (*ProviderConfiguration) NewNoOpProvider

func (c *ProviderConfiguration) NewNoOpProvider(opt *Options) (*NoOpProvider, error)

func (*ProviderConfiguration) NewTelemetryProvider

func (c *ProviderConfiguration) NewTelemetryProvider(opt *Options, attributes []func(provider *OTELProvider)) (*OTELProvider, error)

Jump to

Keyboard shortcuts

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