trace_module

package
v0.0.0-...-53c1a21 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = wrappedCfg{
	Trace: Config{
		Fraction: 1.0,
		Driver:   "none",
	},
}

Functions

func Module

func Module() fx.Option

Module requires ctx_module, log_module, svc_module if configured with stackdriver exporter and cfg_module to provide config

func NewTraceExporter

func NewTraceExporter(ctx context.Context, cfg Config, logger *zap.Logger, svcCfg svc_module.OptionalConfig) (sdktrace.SpanExporter, error)

func NewTraceProvider

func NewTraceProvider(ctx context.Context, lc fx.Lifecycle, texporter sdktrace.SpanExporter, cfg Config, svcCfg svc_module.OptionalConfig, logger *zap.Logger) (trace.TracerProvider, error)

func RegisterTrace

func RegisterTrace(tracerProvoder trace.TracerProvider) error

Types

type Config

type Config struct {
	Fraction float64 `mapstructure:"fraction"`
	Driver   string  `mapstructure:"driver"`
}

func ReadConfig

func ReadConfig(v *viper.Viper) (Config, error)

Jump to

Keyboard shortcuts

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