tracing

package
v0.0.0-...-8f1e39b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTraceIDFromRequest

func GetTraceIDFromRequest(r *http.Request) string

Types

type Service

type Service interface {
	// Reload service (useful for configuration change).
	Reload() error
	// Get global tracer object.
	GetTracer() opentracing.Tracer
}

Service interface.

func New

func New(cfgManager config.Manager, logger log.Logger) (Service, error)

type Trace

type Trace interface {
	// Set tag on trace.
	SetTag(key string, value interface{})
	// Get child trace with an operation name.
	GetChildTrace(operationName string) Trace
	// Will finish the trace.
	Finish()
	// Get trace id as a string (useful for logs).
	GetTraceID() string
	// InjectInHTTPHeader will inject span in http header for forwarding.
	InjectInHTTPHeader(header http.Header) error
}

Trace object interface.

func GetTraceFromContext

func GetTraceFromContext(ctx context.Context) Trace

Jump to

Keyboard shortcuts

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