Fix Pod UID automatic enriching#10081
Merged
exekias merged 3 commits intoelastic:masterfrom Jan 15, 2019
Merged
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.
kaiyan-sheng
approved these changes
Jan 15, 2019
jsoriano
approved these changes
Jan 15, 2019
Member
jsoriano
left a comment
There was a problem hiding this comment.
It LGTM, I have added some comments but they don't need to be addressed now.
| watcher kubernetes.Watcher | ||
| watcherStarted bool | ||
| watcherStartedLock sync.Mutex | ||
| isPod bool |
Member
There was a problem hiding this comment.
Instead of having conditional logic we could maybe have an specialized enricher for pods.
Contributor
Author
|
jenkins, test this please |
Contributor
Author
|
failures look unrelated, merging as this PR has some urgency |
exekias
added a commit
to exekias/beats
that referenced
this pull request
Jan 15, 2019
* 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)
exekias
added a commit
to exekias/beats
that referenced
this pull request
Jan 15, 2019
* 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)
exekias
added a commit
that referenced
this pull request
Jan 15, 2019
* 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)
exekias
added a commit
to exekias/beats
that referenced
this pull request
Jan 16, 2019
* 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)
exekias
added a commit
that referenced
this pull request
Jan 18, 2019
* 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)
exekias
added a commit
that referenced
this pull request
Jan 22, 2019
* 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)
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
* 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)
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
* 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)
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.
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
podandstate_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: