-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Pod UID automatic enriching #10081
Conversation
Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It LGTM, I have added some comments but they don't need to be addressed now.
@@ -59,6 +59,7 @@ type enricher struct { | |||
watcher kubernetes.Watcher | |||
watcherStarted bool | |||
watcherStartedLock sync.Mutex | |||
isPod bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having conditional logic we could maybe have an specialized enricher for pods.
jenkins, test this please |
failures look unrelated, merging as this PR has some urgency |
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit c60282a)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit c60282a)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit c60282a)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit c60282a)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit c60282a)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit c60282a)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit 0ede7e7)
* Fix Pod UID automatic enriching Kubernetes Pod events where not being enriched correctly. Before this change, metadata was being added at the module level, which is correct for all metricsets, except `pod` and `state_pod`. For these metricsets metadata must be added at the root level because we are already under `kubernetes.pod`. Existing metadata was being ignored. This change takes this special case into account and updates events in the right place, ensuring the events get the metadata correctly. (cherry picked from commit 0ede7e7)
Before this change, Kubernetes Pod events where not being enriched correctly and Pod UID was missing, what caused wrong visualizations in Infrastructure UI.
Metadata was being added at the module level, which is correct
for all metricsets, except
pod
andstate_pod
. For these metricsetsmetadata must be added at the root level because we are already under
kubernetes.pod
. Added metadata was being ignored.This change takes this special case into account and updates events in
the right place, ensuring the events get the metadata correctly.
Before this change, missing UID caused this:
After this change visualizations are correct: