observability

package
v0.0.169 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPTraceProvider

func NewHTTPTraceProvider(ctx context.Context, res *resource.Resource, opts ...otlptracehttp.Option) (*trace.TracerProvider, error)

func NewResource

func NewResource(serviceName, serviceVersion string) (*resource.Resource, error)

func SetupOTelSDK

func SetupOTelSDK(ctx context.Context, tracerProvider *trace.TracerProvider) (shutdown func(context.Context) error, err error)

SetupOTelSDK bootstraps the OpenTelemetry pipeline. If it does not return an error, make sure to call shutdown for proper cleanup.

func Tracer

func Tracer() otrace.Tracer

Types

type TracingConfig

type TracingConfig struct {
	Enabled     bool                       `yaml:"enabled" default:"false"`
	Endpoint    string                     `yaml:"endpoint" default:""`
	URLPath     string                     `yaml:"urlPath" default:""`
	Timeout     human.Duration             `yaml:"timeout" default:"15s"`
	Compression bool                       `yaml:"compression" default:"true"`
	Headers     map[string]string          `yaml:"headers"`
	Insecure    bool                       `yaml:"insecure" default:"false"`
	Retry       *otlptracehttp.RetryConfig `yaml:"retry"`
	TLS         *tls.Config                `yaml:"tls"`
}

func (*TracingConfig) AsOTelOpts

func (t *TracingConfig) AsOTelOpts() []otlptracehttp.Option

func (*TracingConfig) Validate

func (t *TracingConfig) Validate() error

Jump to

Keyboard shortcuts

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