Documentation ¶
Index ¶
- func AddTags(span otelTrace.Span, keyValues ...interface{})
- func CreateTracer(name string, config *JaegerConfig) (*sdktrace.TracerProvider, error)
- func SetTracing(isTracing bool)
- func StopTracing(ctx context.Context)
- func Trace(parent context.Context, logger *logrus.Entry, name string, ...) (otelTrace.Span, context.Context)
- type JaegerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTags ¶
AddTag adds additional key-value pairs to a tracing span. This can be used to provide dynamic tags that are determined at runtime and tags with a non-string value. Must have an even number of keyValues with keys being strings.
func CreateTracer ¶
func CreateTracer(name string, config *JaegerConfig) (*sdktrace.TracerProvider, error)
CreateTracer create a tracer
func SetTracing ¶
func SetTracing(isTracing bool)
SetTracing turns tracing on or off. Called by the configuration.
func StopTracing ¶
StopTracing ends all tracing, reporting the spans to the collector.
func Trace ¶
func Trace(parent context.Context, logger *logrus.Entry, name string, tags ...map[string]string) (otelTrace.Span, context.Context)
Trace creates a new tracing span based on the specified name and parent context. It also accepts a logger to record nil context errors and a map of tracing tags. Tracing tag keys and values are strings.
Types ¶
type JaegerConfig ¶
JaegerConfig defines necessary Jaeger config for exporting traces.