Documentation ¶
Index ¶
- Constants
- func CheckHasTraceID(ctx context.Context) bool
- func ExtractGRPCBaggage(ctx context.Context) context.Context
- func ExtractHTTPBaggage(ctx context.Context, header http.Header) context.Context
- func InjectGRPCBaggage()
- func InjectHTTPBaggage(ctx context.Context, header http.Header)
- func NewTracer(serviceName string, exporter tracesdk.SpanExporter, opts ...OptionFunc) (err error)
- func SpanID(span trace.Span) string
- func TraceID(span trace.Span) string
- func Tracer() trace.Tracer
- type Option
- type OptionFunc
- func WithBatchTimeout(timeout time.Duration) OptionFunc
- func WithClientPropagation(p propagation.TextMapPropagator) OptionFunc
- func WithExportTimeout(timeout time.Duration) OptionFunc
- func WithIDGenerator(g tracesdk.IDGenerator) OptionFunc
- func WithMaxExportBatchSize(s int) OptionFunc
- func WithMaxQueueSize(s int) OptionFunc
- func WithRawSpanLimits(l tracesdk.SpanLimits) OptionFunc
- func WithResource(attrs []attribute.KeyValue) OptionFunc
- func WithSampler(s tracesdk.Sampler) OptionFunc
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 ExtractHTTPBaggage ¶
func InjectGRPCBaggage ¶
func InjectGRPCBaggage()
func NewTracer ¶
func NewTracer(serviceName string, exporter tracesdk.SpanExporter, opts ...OptionFunc) (err error)
Types ¶
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 |
Click to show internal directories.
Click to hide internal directories.