otel

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Baggage     string = "baggage"
	LibraryName string = "rpc.otel"
)
View Source
const (
	AttributeLogID    = attribute.Key("log_id")
	AttributeRequest  = attribute.Key("request")
	AttributeResponse = attribute.Key("response")
)
View Source
const (
	AttributeRedisError     = attribute.Key("redis.cmd.error")
	AttributeRedisCmdName   = attribute.Key("redis.cmd.name")
	AttributeRedisCmdString = attribute.Key("redis.cmd.string")
	AttributeRedisCmdArgs   = attribute.Key("redis.cmd.args")
)
View Source
const (
	AttributeGinError = attribute.Key("gin.errors")
)
View Source
const (
	AttributeSpanID = attribute.Key("span.id")
)
View Source
const (
	AttributeTraceID = attribute.Key("trace.id")
)

Variables

This section is empty.

Functions

func CheckHasTraceID

func CheckHasTraceID(ctx context.Context) bool

func ExtractGRPCBaggage

func ExtractGRPCBaggage(ctx context.Context) context.Context

func ExtractHTTPBaggage

func ExtractHTTPBaggage(ctx context.Context, header http.Header) context.Context

func InjectGRPCBaggage

func InjectGRPCBaggage()

func InjectHTTPBaggage

func InjectHTTPBaggage(ctx context.Context, header http.Header)

func NewTracer

func NewTracer(serviceName string, exporter tracesdk.SpanExporter, opts ...OptionFunc) (err error)

func SpanID

func SpanID(span trace.Span) string

func TraceID

func TraceID(span trace.Span) string

func Tracer

func Tracer() trace.Tracer

Types

type Option

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

type OptionFunc

type OptionFunc func(*Option)

func WithBatchTimeout

func WithBatchTimeout(timeout time.Duration) OptionFunc

func WithClientPropagation

func WithClientPropagation(p propagation.TextMapPropagator) OptionFunc

func WithExportTimeout

func WithExportTimeout(timeout time.Duration) OptionFunc

func WithIDGenerator

func WithIDGenerator(g tracesdk.IDGenerator) OptionFunc

func WithMaxExportBatchSize

func WithMaxExportBatchSize(s int) OptionFunc

func WithMaxQueueSize

func WithMaxQueueSize(s int) OptionFunc

func WithRawSpanLimits

func WithRawSpanLimits(l tracesdk.SpanLimits) OptionFunc

func WithResource

func WithResource(attrs []attribute.KeyValue) OptionFunc

func WithSampler

func WithSampler(s tracesdk.Sampler) OptionFunc

Directories

Path Synopsis
exporters
prometheus
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/prometheus
zipkin
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/zipkin
TODO https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/zipkin

Jump to

Keyboard shortcuts

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