tracer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderJaeger   = "jaeger"
	ProviderZipkin   = "zipkin"
	ProviderOtlpHttp = "otlp-http"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Id       string // service id
	Name     string // service name
	Env      string // environment
	Endpoint string // service address
}

Conf struct

func NewConf

func NewConf(id, name, env, endpoint string) *Conf

NewConf init conf

func (*Conf) CreateTracerProvider

func (c *Conf) CreateTracerProvider(provider, url string) (tracesdk.SpanExporter, error)

CreateTracerProvider create provider

func (*Conf) TraceProvider

func (c *Conf) TraceProvider(options ...OptionFunc) *tracesdk.TracerProvider

TraceProvider create provider

func (*Conf) WithProvider

func (c *Conf) WithProvider(provider string) OptionFunc

WithProvider set provider type

func (*Conf) WithSampling

func (c *Conf) WithSampling(sampling float64) OptionFunc

WithSampling set sampling rate

type Option

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

Option struct

type OptionFunc

type OptionFunc func(*Option)

Jump to

Keyboard shortcuts

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