tracing

package
v0.12.2-beta.1 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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTracer

func InitTracer(cfg Config) (func(), error)

InitTracer initializes the opentelemetry tracer to be used by grpc and http clients and servers.

func NewHttpClient

func NewHttpClient(name string) *http.Client

Types

type Config

type Config struct {
	Enabled     bool              `mapstructure:"enabled" default:"false"`
	ServiceName string            `mapstructure:"service_name" default:"guardian"`
	Labels      map[string]string `mapstructure:"labels"`
	Exporter    string            `mapstructure:"exporter" default:"stdout"`
	OTLP        struct {
		Headers  map[string]string `mapstructure:"headers"`
		Endpoint string            `mapstructure:"endpoint" default:"otlp.nr-data.net:443"`
	} `mapstructure:"otlp"`
}

Jump to

Keyboard shortcuts

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