tracex

package module
v0.0.0-...-763f2c4 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExporterProvider

type ExporterProvider interface {
	Exporter(ctx context.Context) (sdktrace.SpanExporter, error)
}

type GRPCOptions

type GRPCOptions struct {
	Endpoint           string
	Insecure           bool
	TLSConfig          *tls.Config
	Headers            map[string]string
	Compressor         string
	DialOptions        []grpc.DialOption
	GRPCConn           *grpc.ClientConn
	ReconnectionPeriod time.Duration
	Retry              *otlptracegrpc.RetryConfig
	Timeout            time.Duration
	ServiceConfig      string
}

func (*GRPCOptions) Exporter

func (o *GRPCOptions) Exporter(ctx context.Context) (sdktrace.SpanExporter, error)

type HTTPOptions

type HTTPOptions struct {
	Endpoint    string
	Insecure    bool
	TLSConfig   *tls.Config
	Headers     map[string]string
	Compression otlptracehttp.Compression
	Retry       *otlptracehttp.RetryConfig
	Timeout     time.Duration
	URLPath     string
}

func (*HTTPOptions) Exporter

func (o *HTTPOptions) Exporter(ctx context.Context) (sdktrace.SpanExporter, error)

type JaegerOptions

type JaegerOptions struct {
	Endpoint string
	Username string
	Password string
}

func (*JaegerOptions) Exporter

type Option

type Option func(o *options)

func Attributes

func Attributes(attrs ...attribute.KeyValue) Option

func GRPC

func GRPC(gRPCOptions *GRPCOptions) Option

func HTTP

func HTTP(httpOptions *HTTPOptions) Option

func IDGenerator

func IDGenerator(idGen sdktrace.IDGenerator) Option

func Jaeger

func Jaeger(jaegerOptions *JaegerOptions) Option

func Propagators

func Propagators(propagators ...propagation.TextMapPropagator) Option

func RawSpanLimits

func RawSpanLimits(limits *sdktrace.SpanLimits) Option

func Resources

func Resources(res resourcex.ResourceFlag) Option

func Sampler

func Sampler(sampler sdktrace.Sampler) Option

func Service

func Service(svc *resourcex.Service) Option

func SpanProcessor

func SpanProcessor(spanProcessor sdktrace.SpanProcessor) Option

func Writer

func Writer(writerOptions *WriterOptions) Option

func Zipkin

func Zipkin(zipkinOptions *ZipkinOptions) Option

type Trace

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

func NewTrace

func NewTrace(ctx context.Context, opts ...Option) (*Trace, error)

func (*Trace) SetGlobal

func (trace *Trace) SetGlobal() *Trace

func (*Trace) TextMapPropagator

func (trace *Trace) TextMapPropagator() propagation.TextMapPropagator

func (*Trace) TracerProvider

func (trace *Trace) TracerProvider() trace.TracerProvider

type WriterOptions

type WriterOptions struct {
	// Writer 标准输入或者文件
	Writer            io.Writer
	PrettyPrint       bool
	WithoutTimestamps bool
}

func (*WriterOptions) Exporter

type ZipkinOptions

type ZipkinOptions struct {
	URL string
}

func (*ZipkinOptions) Exporter

Jump to

Keyboard shortcuts

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