tracing

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpanKindInternal = pkgtracing.SpanKindInternal
	SpanKindServer   = pkgtracing.SpanKindServer
	SpanKindProducer = pkgtracing.SpanKindProducer
	SpanKindConsumer = pkgtracing.SpanKindConsumer
	StatusUnset      = pkgtracing.StatusUnset
	StatusOK         = pkgtracing.StatusOK
	StatusError      = pkgtracing.StatusError
)

Variables

View Source
var ErrNotCompiled = pkgtracing.ErrNotCompiled

Functions

func ContextFromHeaders

func ContextFromHeaders(ctx context.Context, headers map[string]string) context.Context

func Enabled

func Enabled() bool

func ExtractCarrier

func ExtractCarrier(ctx context.Context, carrier tracecontext.Carrier) context.Context

func ExtractHTTPHeader

func ExtractHTTPHeader(ctx context.Context, header http.Header) context.Context

func HeaderValue

func HeaderValue(headers map[string]string, key string) string

func HeadersFromContext

func HeadersFromContext(ctx context.Context) map[string]string

func Init

func Init(ctx context.Context, cfg Config) (func(context.Context) error, error)

func InjectCarrier

func InjectCarrier(ctx context.Context, carrier tracecontext.Carrier)

func InjectHTTPHeader

func InjectHTTPHeader(ctx context.Context, header http.Header)

func RequestID

func RequestID(ctx context.Context) string

func SetCorrelationAttributes

func SetCorrelationAttributes(ctx context.Context, span Span)

func SetHTTPSpanCorrelationAttributes added in v0.1.4

func SetHTTPSpanCorrelationAttributes(ctx context.Context, span Span)

func SetSpanCorrelationAttributes

func SetSpanCorrelationAttributes(ctx context.Context, span Span)

func Shutdown

func Shutdown(ctx context.Context) error

func SpanID

func SpanID(ctx context.Context) string

func SpanIDFromHeaders

func SpanIDFromHeaders(headers map[string]string) string

func TraceID

func TraceID(ctx context.Context) string

func TraceIDFromHeaders

func TraceIDFromHeaders(headers map[string]string) string

func Traceparent

func Traceparent(ctx context.Context) string

Types

type Attr added in v0.1.4

type Attr = pkgtracing.Attr

func Bool added in v0.1.4

func Bool(key string, value bool) Attr

func Float64 added in v0.1.4

func Float64(key string, value float64) Attr

func Int added in v0.1.4

func Int(key string, value int) Attr

func Int64 added in v0.1.4

func Int64(key string, value int64) Attr

func String added in v0.1.4

func String(key string, value string) Attr

type Config

type Config = pkgtracing.Config

func DefaultConfig

func DefaultConfig() Config

type Span added in v0.1.4

type Span = pkgtracing.Span

func StartSpan

func StartSpan(ctx context.Context, name string, attrs ...Attr) (context.Context, Span)

func StartSpanWithOptions added in v0.1.4

func StartSpanWithOptions(ctx context.Context, name string, opts SpanOptions, attrs ...Attr) (context.Context, Span)

type SpanKind added in v0.1.4

type SpanKind = pkgtracing.SpanKind

type SpanOptions added in v0.1.4

type SpanOptions = pkgtracing.SpanOptions

type StatusCode added in v0.1.4

type StatusCode = pkgtracing.StatusCode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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