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

[receiver/mongodbatlas] Fix log parsing for v4.2 clusters #14088

Merged
merged 7 commits into from
Sep 13, 2022

Conversation

BinaryFissionGames
Copy link
Contributor

@BinaryFissionGames BinaryFissionGames commented Sep 12, 2022

Description:

  • Add in support for parsing logs from v4.2 clusters

MongoDB Atlas supports multiple MongoDB versions. v4.2 was the last version to use a non-structured log (https://www.mongodb.com/docs/v4.2/reference/log-messages/) - the next supported version begins using structured logging (https://www.mongodb.com/docs/v4.4/reference/log-messages/).

This means that v4.2 host logs must be parsed differently. Audit logs have remained JSON between versions (for 4.2: https://www.mongodb.com/docs/v4.2/reference/audit-message/#audit-message), so they didn't require any change to parse.

Link to tracking Issue: Resolves #14008

Testing:

  • Added unit tests with sample data for decoding
  • Manually tested against both a v4.2 cluster and v5.0 cluster

@BinaryFissionGames BinaryFissionGames marked this pull request as ready for review September 13, 2022 14:02
@BinaryFissionGames BinaryFissionGames requested a review from a team as a code owner September 13, 2022 14:02
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tests

@djaglowski djaglowski added the ready to merge Code review completed; ready to merge by maintainers label Sep 13, 2022
@bogdandrutu bogdandrutu merged commit 52ba7d5 into open-telemetry:main Sep 13, 2022
@djaglowski djaglowski deleted the mongodb-atlas-4.2-logging branch September 13, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[receiver/mongodbatlas] Scraping logs fails for version 4.2 clusters
4 participants