Description
Component(s)
receiver/k8sobjects
Is your feature request related to a problem? Please describe.
Hello 👋
We are currently working on a PoC to replace Grafana Alloy to collect Kubernetes events by the OpenTelemetry collector with k8sobjectsreceiver
.
While this works pretty well out of the box, I have some doubts about how the restarts are handled by this receiver. In Grafana Alloy for example, there is a positions file used by the loki.source.kubernetes_events
component to avoid loosing events in case of restarts.
Our k8sobjectsreceiver
is configured by the Helm chart directly when we enable presets.kubernetesEvents
.
From my understanding of the actual code of the receiver, it seems only events that are created once the receiver is running are processed. Is this correct? Because in that case, any rolling update / crash will lead to a data loss because some events won't be processed (events happening during the downtime).
Describe the solution you'd like
Ideally, I would like:
- A workaround with actual collector components
- A mechanism integrated to the
k8sobjectsreceiver
to preserve state between restarts, like in Alloy
Describe alternatives you've considered
No response
Additional context
No response