[processor/k8sattributesprocessor] Add pod_delete_grace_period configuration option#48127
Open
giuliano-sider wants to merge 2 commits intoopen-telemetry:mainfrom
Open
[processor/k8sattributesprocessor] Add pod_delete_grace_period configuration option#48127giuliano-sider wants to merge 2 commits intoopen-telemetry:mainfrom
giuliano-sider wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Contributor
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
|
…c period Assisted-by: Antigravity
…eletion grace period Assisted-by: Antigravity
0c43299 to
06ebcf8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the
pod_delete_grace_periodconfiguration option to thek8sattributesprocessor, making the cache eviction grace window for deleted pods configurable.By default, after receiving a pod deletion event, the processor keeps the pod's metadata in its lookup cache for a short duration (
120s) before eviction. This ensures that delayed spans, metrics, or logs originating from the pod can still be correctly enriched. With this change, users can tune this duration to match their environment's constraints (e.g. reducing memory overhead by lowering the duration, or setting it to0sto evict immediately).Important
Stacked PR: This PR is stacked on top of [processor/k8sattributesprocessor] Add watch_sync_period config option. Only the changes in the second commit (
Add pod_delete_grace_period config option...) are new to this PR.Link to tracking Issue
The issue of configurability (and its longstanding TODO) are brought up in #48110.
Testing & Verification
Automated Tests
pod_delete_grace_periodvalues (e.g.,30s) are successfully loaded, parsed, and validated.-30s) correctly fail configuration validation.go test -v ./...Documentation