tracing

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestIDFromContext added in v0.1.0

func RequestIDFromContext(ctx context.Context) string

func WithRequestID added in v0.1.0

func WithRequestID(ctx context.Context, requestID string) context.Context

Types

type Tracer

type Tracer interface {
	io.Closer
	FromCtx(ctx context.Context, op string) (opentracing.Span, context.Context)
	FromCtxf(ctx context.Context, msg string, args ...interface{}) (opentracing.Span, context.Context)
}

Tracer describes a tracing adapter interface.

func NewJaeger

func NewJaeger() (Tracer, error)

NewJaeger allocates and returns a Jaeger implementation of the Tracer interface.

It reads configuration from the environment and defaults to reporting spans to agents on localhost:6831. All spans are logged and Promethues metrics are registered on prometheus.DefaultRegisterer.

func NewNoop

func NewNoop() Tracer

NewNoop allocates and returns a no-op implementation of the Tracer interface.

Jump to

Keyboard shortcuts

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