You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: processor/k8sattributesprocessor/README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,14 @@ wait_for_metadata: true
226
226
wait_for_metadata_timeout: 10s
227
227
```
228
228
229
+
## Informer Cache Resync Period
230
+
231
+
Reprocessing the informer cache periodically (resyncing) enqueues all cached K8s objects back into event handlers. In large clusters (e.g., 100K pods), this causes significant CPU spikes, memory churn, and garbage collection overhead.
232
+
Because resource state modifications are already pushed immediately via Kubernetes watch events, a resync period is almost entirely unnecessary.
233
+
234
+
- `watch_sync_period` (`default: 5m`): The resync period for K8s informers. You may set this to `0s` to disable resyncing completely (recommended for large clusters).
235
+
236
+
229
237
## Extracting attributes from pod labels and annotations
230
238
231
239
The k8sattributesprocessor can also set resource attributes from k8s labels and annotations of pods, namespaces, deployments, statefulsets, daemonsets, jobs and nodes.
@@ -700,6 +708,10 @@ k8s_attributes:
700
708
# Default: 10s
701
709
wait_for_metadata_timeout: 10s
702
710
711
+
# Informer resync period. Setting this to 0s disables resyncing completely.
712
+
# Default: 5m
713
+
watch_sync_period: 5m
714
+
703
715
# Extract configuration - defines what metadata to extract
704
716
extract:
705
717
# Metadata fields to extract as resource attributes
@@ -870,6 +882,7 @@ k8s_attributes:
870
882
| `passthrough` | bool | `false` | Only add pod IP without extracting metadata (no K8s API calls) |
871
883
| `wait_for_metadata` | bool | `false` | Block collector startup until metadata is synced |
872
884
| `wait_for_metadata_timeout` | duration | `10s` | Max wait time for metadata sync on startup |
885
+
| `watch_sync_period` | duration | `5m` | Resync period for K8s informers (`0s` disables resync completely) |
Copy file name to clipboardExpand all lines: processor/k8sattributesprocessor/config.schema.yaml
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -135,5 +135,9 @@ properties:
135
135
description: WaitForMetadataTimeout is the maximum time the processor will wait for the k8s metadata to be synced.
136
136
type: string
137
137
format: duration
138
+
watch_sync_period:
139
+
description: WatchSyncPeriod determines the resync period for K8s informers. Reprocessing the informer cache periodically can cause significant memory churn and CPU spikes. Setting this to 0 disables resync.
0 commit comments