[processor/k8sattributes] Processor does not add resource attributes from labels when the collector is restarted #36147
Labels
bug
Something isn't working
needs triage
New item requiring triage
processor/k8sattributes
k8s Attributes processor
Component(s)
processor/k8sattributes
What happened?
Description
Restarting the collector causes k8sattributes processor to not add resource attributes from pod labels for the first batch of logs. Subsequent logs already have all resource attributes. Adding a filter by node partially helps to fix the situation, but for large Kubernetes clusters the problem still reproduces:
To check, I tried adding time.Sleep(5 * time.Second) in the Start(_ context.Context, host component.Host) method. In this case, the problem does not reproduce. But I think that time.Sleep() is not the most reliable and correct solution to this problem.
My configuration for k8sattributes processor:
Steps to Reproduce
Expected Result
Actual Result
Collector version
v0.112.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: