tracing

package
v2.0.4 Latest Latest
Warning

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

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

Documentation

Overview

Package tracing provides distributed tracing services to Trickster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigurePropagators added in v2.0.4

func ConfigurePropagators()

ConfigurePropagators installs Trickster's default distributed-tracing propagators for inbound extraction and outbound origin request injection.

func DefaultPropagators added in v2.0.4

func DefaultPropagators() propagation.TextMapPropagator

DefaultPropagators returns the W3C propagators Trickster uses for trace context and baggage across proxy boundaries.

func HTTPToCode

func HTTPToCode(status int) codes.Code

HTTPToCode translates an HTTP status code into a GRPC code

func Sampler added in v2.0.4

func Sampler(o *options.Options) sdktrace.Sampler

Sampler returns a parent-based sampler for the provided tracing options. SampleRate controls root traces started by Trickster, while sampled upstream parent traces continue through Trickster's proxy boundary.

Types

type ShutdownFunc

type ShutdownFunc func(context.Context) error

ShutdownFunc defines a function used to Flush a Tracer

type Tags

type Tags map[string]string

Tags represents a collection of Tags

func (Tags) Merge

func (t Tags) Merge(t2 Tags)

Merge merges t2, when not nil, into t

func (Tags) MergeAttr

func (t Tags) MergeAttr(attr []attribute.KeyValue)

MergeAttr merges the provided attributes into the Tags map

func (Tags) ToAttr

func (t Tags) ToAttr() []attribute.KeyValue

ToAttr returns the Tags map as an Attributes List

type Tracer

type Tracer struct {
	trace.Tracer
	Name         string
	ShutdownFunc ShutdownFunc
	Options      *options.Options
}

Tracer is a Tracer object used by Trickster

type Tracers

type Tracers map[string]*Tracer

Tracers is a map of *Tracer objects

Directories

Path Synopsis
Package errors provides tracing errors
Package errors provides tracing errors
exporters
noop
Package noop provides a Noop Tracer
Package noop provides a Noop Tracer
otlp
Package otlp provides a OTLP Tracer
Package otlp provides a OTLP Tracer
stdout
Package stdout provides a Stdout Tracer
Package stdout provides a Stdout Tracer
Package registration registers configured tracers for use with handlers
Package registration registers configured tracers for use with handlers

Jump to

Keyboard shortcuts

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