trace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package trace wires the OTLP tracer + W3C propagator used by the boomer load-test workers. Same shape as internal/serverboot.InitTracing but without the metrics/HTTP surface that workers don't need.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, serviceName string, sampler sdktrace.Sampler) (*sdktrace.TracerProvider, error)

Init registers a global TracerProvider with the given sampler and the W3C TraceContext propagator. The OTLP gRPC exporter honors OTEL_EXPORTER_OTLP_ENDPOINT.

Types

type UpdatableSampler

type UpdatableSampler struct {
	// contains filtered or unexported fields
}

UpdatableSampler wraps a TraceIDRatioBased sampler whose probability can be swapped at runtime (mirrors common/trace.py:UpdatableSampler on the Python side). The OTel TracerProvider only accepts one Sampler at construction, so to change probability later you have to hand it a stable wrapper that internally swaps.

func NewUpdatableSampler

func NewUpdatableSampler(initialProbability float64) *UpdatableSampler

func (*UpdatableSampler) Description

func (u *UpdatableSampler) Description() string

func (*UpdatableSampler) ShouldSample

func (*UpdatableSampler) UpdateProbability

func (u *UpdatableSampler) UpdateProbability(p float64)

Jump to

Keyboard shortcuts

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