otel

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName  string
	OtelType     string  // type: otlp ,jaeger
	Fraction     float64 // 采样率: 默认0不会采集
	PanicOnError bool

	Jaeger jaegerConfig // otel jaeger 配置
	Otlp   otlpConfig   // otel otlp 配置
	// contains filtered or unexported fields
}

Config ...

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig ...

func Load

func Load(key string) *Config

Load parses container configuration from configuration provider, such as a toml file, then use the configuration to construct a component container.

func (*Config) Build

func (config *Config) Build(options ...Option) trace.TracerProvider

Build ...

func (*Config) Stop

func (config *Config) Stop() error

Stop 停止

func (*Config) WithOtlpResourceOption

func (config *Config) WithOtlpResourceOption(options ...resource.Option) *Config

WithOtlpResourceOption 自定义otlp resource Option

func (*Config) WithOtlpTraceGrpcOption

func (config *Config) WithOtlpTraceGrpcOption(options ...otlptracegrpc.Option) *Config

WithOtlpTraceGrpcOption 自定义otlp Option

func (*Config) WithTracerProviderOption

func (config *Config) WithTracerProviderOption(options ...tracesdk.TracerProviderOption) *Config

WithTracerProviderOption ...

type Option

type Option func(c *Config)

Option overrides a Container's default configuration.

Jump to

Keyboard shortcuts

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