tracing

package module
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UNKNOWN_EXPORTER       ExporterType = 0
	OTLP_TLS_GRPC_EXPORTER ExporterType = 1
	OTLP_GRPC_EXPORTER     ExporterType = 2
	OTLP_HTTPS_EXPORTER    ExporterType = 3
	JAEGER_EXPORTER        ExporterType = 4

	OTLP_GZIP_COMPRESSIONS OTLPCompression = "gzip"
)

Variables

Functions

func Format

func Format(ctx context.Context) zapcore.Field

func Message

func Message(msg string) string

func NewConsumerSpan

func NewConsumerSpan(tracer trace.Tracer, header amqp.Table, typ string) (context.Context, trace.Span)

Types

type AMQPHeader

type AMQPHeader amqp.Table

func (AMQPHeader) Get

func (h AMQPHeader) Get(key string) string

func (AMQPHeader) Keys

func (h AMQPHeader) Keys() []string

func (AMQPHeader) Set

func (h AMQPHeader) Set(key, val string)

type ExporterType

type ExporterType int32

type Headers

type Headers map[string]string

type OTLPCompression

type OTLPCompression string

type OTLPTracingBuilder

type OTLPTracingBuilder interface {
	TracingBuilder
	WithApiKeyHeader() OTLPTracingBuilder
	WithTimeout(t time.Duration) OTLPTracingBuilder
	WithReconnection(t time.Duration) OTLPTracingBuilder
	WithCompression(c OTLPCompression) OTLPTracingBuilder
}

func NewOTLP

func NewOTLP(cfg *configs.Configs, logger logging.Logger) OTLPTracingBuilder

type Traceparent

type Traceparent struct {
	TraceID    trace.TraceID
	SpanID     trace.SpanID
	TraceFlags trace.TraceFlags
}

type TracingBuilder

type TracingBuilder interface {
	AddHeader(key, value string) TracingBuilder
	WithHeaders(headers Headers) TracingBuilder
	Type(t ExporterType) TracingBuilder
	Endpoint(s string) TracingBuilder
	Build() (shutdown func(context.Context) error, err error)
}

Jump to

Keyboard shortcuts

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