telemetry

package
v0.151.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMetricStatCountSpansSampledEnabled added in v0.103.0

func IsMetricStatCountSpansSampledEnabled() bool

func IsRecordPolicyEnabled added in v0.120.0

func IsRecordPolicyEnabled() bool

Types

type DecisionAttributes added in v0.151.0

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

DecisionAttributes holds pre-allocated attribute.KeyValue for all decision types. It provides O(1) access to pre-computed attributes using array indexing instead of map lookups, eliminating runtime allocations during trace processing. The struct is immutable after construction and safe for concurrent access.

func NewDecisionAttributes added in v0.151.0

func NewDecisionAttributes(attrKey attribute.Key) *DecisionAttributes

NewDecisionAttributes creates a DecisionAttributes instance with pre-computed KeyValue pairs for all 8 decision types defined in samplingpolicy.Decision. Parameters:

  • attrKey: The attribute key to use for all decision attributes (e.g., "decision.final", "policy.decision")

Example:

spanDecisionAttrs := NewDecisionAttributes(attribute.Key("decision.final"))
attr := spanDecisionAttrs.Get(samplingpolicy.Sampled) // Returns pre-allocated KeyValue

func (*DecisionAttributes) Get added in v0.151.0

Get returns the pre-allocated KeyValue for the given decision.

Jump to

Keyboard shortcuts

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