Skip to content
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(logs): fix metadata for pods with more than one container #2863

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

andrzej-stencel
Copy link
Contributor

Fixes #2862
The containerName metadata extraction gives incorrect results for pods with more than one containers.
We don't need this extraction anyway, because container logs already have the k8s.container.name attribute from log file name.

@andrzej-stencel andrzej-stencel force-pushed the fix-container-metadata-for-container-logs branch from 8524148 to 0c71c40 Compare February 10, 2023 12:34
@github-actions github-actions bot added the documentation documentation label Feb 10, 2023
@andrzej-stencel andrzej-stencel marked this pull request as ready for review February 10, 2023 12:34
@andrzej-stencel andrzej-stencel requested a review from a team as a code owner February 10, 2023 12:34
Fixes #2862
The `containerName` metadata extraction gives incorrect results
for pods with more than one containers.
We don't need this extraction anyway, because container logs already have the `k8s.container.name` attribute from log file name.
@andrzej-stencel andrzej-stencel force-pushed the fix-container-metadata-for-container-logs branch from 0c71c40 to b0cae06 Compare February 10, 2023 12:35
@andrzej-stencel andrzej-stencel changed the title fix(logs): fix container attribute fix(logs): fix metadata for pods with more than one container Feb 10, 2023
@sumo-drosiek
Copy link
Contributor

Could we add some tests for it?

@andrzej-stencel
Copy link
Contributor Author

I'll do this separately. I don't want this fix to be slowed down by adding a new integration test for this - which isn't trivial.

@andrzej-stencel andrzej-stencel merged commit 5c8020a into main Feb 10, 2023
@andrzej-stencel andrzej-stencel deleted the fix-container-metadata-for-container-logs branch February 10, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs from two different containers of one pod show up in Sumo as coming from one of the containers
2 participants