Documentation ¶
Index ¶
Constants ¶
View Source
const LocalsCtxKey = "otel-ctx"
Variables ¶
View Source
var ConfigDefault = Config{ SpanName: "{{ .Method }} {{ .Path }}", LocalKeyName: LocalsCtxKey, TracerStartAttributes: []trace.SpanStartOption{ trace.WithSpanKind(trace.SpanKindServer), }, Propagator: propagation.NewCompositeTextMapPropagator(b3.New(b3.WithInjectEncoding(b3.B3MultipleHeader)), propagation.TraceContext{}, propagation.Baggage{}), }
ConfigDefault is the default config
View Source
var Tracer = otel.Tracer("fiber-otel-router")
Functions ¶
func SpanFromCtx ¶
Types ¶
type Config ¶
type Config struct { Tracer trace.Tracer TracerStartAttributes []trace.SpanStartOption // SpanName is a template for span naming. // The scope is fiber context. SpanName string LocalKeyName string Filters []Filter //Blacklist filter Propagator propagation.TextMapPropagator }
Config defines the config for middleware.
Click to show internal directories.
Click to hide internal directories.