tracing

package
v0.0.0-...-c228ca5 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ForceTracingBaggageKey is a request header name that forces tracing sampling.
	ForceTracingBaggageKey = "X-Thanos-Force-Tracing"
)

Variables

This section is empty.

Functions

func ContextWithTracer

func ContextWithTracer(ctx context.Context, tracer opentracing.Tracer) context.Context

ContextWithTracer returns a new `context.Context` that holds a reference to given opentracing.Tracer.

func DoWithSpan

func DoWithSpan(ctx context.Context, operationName string, doFn func(context.Context, Span), opts ...opentracing.StartSpanOption)

DoWithSpan executes function doFn inside new span with `operationName` name and hooking as child to a span found within given context if any. It uses opentracing.Tracer propagated in context. If no found, it uses noop tracer notification.

Types

type Span

type Span = opentracing.Span

func StartSpan

func StartSpan(ctx context.Context, operationName string, opts ...opentracing.StartSpanOption) (Span, context.Context)

StartSpan starts and returns span with `operationName` and hooking as child to a span found within given context if any. It uses opentracing.Tracer propagated in context. If no found, it uses noop tracer without notification.

type Tag

type Tag = opentracing.Tag

type Tags

type Tags = opentracing.Tags

type Tracer

type Tracer interface {
	GetTraceIDFromSpanContext(ctx opentracing.SpanContext) (string, bool)
}

Tracer interface to provide GetTraceIDFromSpanContext method.

Jump to

Keyboard shortcuts

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