containertagsbuffer

package
v0.80.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package containertagsbuffer contains the logic to buffer payloads for container tags enrichment

Package containertagsbuffer contains the logic to buffer payloads for container tags enrichment

Package containertagsbuffer contains the logic to buffer payloads for container tags enrichment

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerTagsBuffer

type ContainerTagsBuffer interface {
	Start()
	Stop()
	IsEnabled() bool
	AsyncEnrichment(containerID string, applyResult func([]string, error, *DebugInfo), payloadSize int64) (pending bool)
}

ContainerTagsBuffer is a buffer for container tag resolution.

In kubernetes, containers start and emit spans before container tags (pod, deployment..) are extracted from the kubelet. This buffer holds incoming tagging requests until specific tags (e.g., "kube_pod_name")

Safety mechanisms - at most 10% of the max trace-agent memory can be used by payloads pending resolution - payloads can't be buffered more then `maxBufferDuration` - if we failed the resolution of a containerID before the time limit, further payloads from this containerID are not buffered

func NewContainerTagsBuffer

func NewContainerTagsBuffer(conf *config.AgentConfig, statsd statsd.ClientInterface) ContainerTagsBuffer

NewContainerTagsBuffer creates a new buffer if it's enabled in configuration and the agent is in kubernetes elses returns a NoOpTagBuffer

type DebugInfo added in v0.80.0

type DebugInfo struct {
	Error                string
	LatencyMs            int64
	WasBuffered          bool
	BufferMs             int64
	BufferEvictionReason string
}

DebugInfo contains troubleshooting information about container tags resolution. It is only populated when a notable event occurs (error, buffering, denial).

func (*DebugInfo) HasData added in v0.80.0

func (d *DebugInfo) HasData() bool

HasData returns true if the DebugInfo has any notable data worth reporting.

type NoOpTagsBuffer

type NoOpTagsBuffer struct{}

NoOpTagsBuffer is a tagsbuffer that does nothing

func (*NoOpTagsBuffer) AsyncEnrichment

func (n *NoOpTagsBuffer) AsyncEnrichment(string, func([]string, error, *DebugInfo), int64) bool

AsyncEnrichment returns false as no enrichment is pending

func (*NoOpTagsBuffer) IsEnabled

func (n *NoOpTagsBuffer) IsEnabled() bool

IsEnabled returns false

func (*NoOpTagsBuffer) Start

func (n *NoOpTagsBuffer) Start()

Start does nothing

func (*NoOpTagsBuffer) Stop

func (n *NoOpTagsBuffer) Stop()

Stop does nothing

Jump to

Keyboard shortcuts

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