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), 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 NoOpTagsBuffer ¶
type NoOpTagsBuffer struct{}
NoOpTagsBuffer is a tagsbuffer that does nothing
func (*NoOpTagsBuffer) AsyncEnrichment ¶
AsyncEnrichment returns false as no enrichment is pending
func (*NoOpTagsBuffer) IsEnabled ¶
func (n *NoOpTagsBuffer) IsEnabled() bool
IsEnabled returns false