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/mongodbatlasreceiver] Add Log collection #12800

Merged
merged 29 commits into from
Aug 15, 2022

Conversation

armstrmi
Copy link
Contributor

@armstrmi armstrmi commented Aug 1, 2022

Description:

  • Added functionality for a logs receiver to collect logs from project clusters specified by the user.
  • Along with cluster logs, audit logs from those clusters are also scraped.
  • New Log and Audit log structures added in to the internal package logs.go
  • Log conversion from new custom log structures into plog.Logs

Link to tracking Issue:
#12347

Testing:

  • Tested changes against a live system and was able to successfully retrieve mongo and audit logs
  • New Unit tests added to config.go_test, receiver_test.go,
  • New Test Files added mongodb_event_to_logdata_test.go, logs_test.go

Documentation:

  • Added changes to the local README to correlate with the updated configuration.

receiver/mongodbatlasreceiver/README.md Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/README.md Show resolved Hide resolved
receiver/mongodbatlasreceiver/config.go Show resolved Hide resolved
receiver/mongodbatlasreceiver/internal/model/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/mongodb_event_to_logdata.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/receiver.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/README.md Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/README.md Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/factory.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/mongodb_event_to_logdata.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/mongodb_event_to_logdata.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/receiver.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
@armstrmi armstrmi force-pushed the mongo_atlas_logs_receiver branch from ebd6c3d to bbfcf44 Compare August 2, 2022 16:07
@StefanKurek
Copy link
Contributor

@armstrmi once you fix the failures, I think it's looking pretty good for an actual PR

@armstrmi armstrmi force-pushed the mongo_atlas_logs_receiver branch from 3d8ef2b to fe18da6 Compare August 3, 2022 17:30
receiver/mongodbatlasreceiver/factory.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
@armstrmi armstrmi force-pushed the mongo_atlas_logs_receiver branch from 0c3259f to 4e78e85 Compare August 4, 2022 14:35
@armstrmi armstrmi changed the title feat: Mongo atlas logs receiver [receiver/mongodbatlasreceiver] Add Log collection Aug 4, 2022
receiver/mongodbatlasreceiver/internal/model/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
@armstrmi armstrmi marked this pull request as ready for review August 4, 2022 18:58
@armstrmi armstrmi requested review from a team and Aneurysm9 August 4, 2022 18:58
receiver/mongodbatlasreceiver/README.md Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/README.md Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/README.md Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/config.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/config.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/receiver.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
@armstrmi armstrmi force-pushed the mongo_atlas_logs_receiver branch 3 times, most recently from 4b49b8a to 7d81dc1 Compare August 9, 2022 14:30
@armstrmi armstrmi requested a review from djaglowski August 9, 2022 14:51
…truct to reduce punching holes in more helper functions

Signed-off-by: armstrmi <[email protected]>
Signed-off-by: armstrmi <[email protected]>
Signed-off-by: armstrmi <[email protected]>
@armstrmi armstrmi force-pushed the mongo_atlas_logs_receiver branch from 7303f44 to 733d681 Compare August 15, 2022 13:43
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.

This is looking really good. Just two minor things to resolve yet:

  • Early return in getHostLogs / getHostAuditLogs
  • ProjectConfig variable name in one func

receiver/mongodbatlasreceiver/logs.go Outdated Show resolved Hide resolved
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.

Thanks for iterating @armstrmi. This looks good.

@djaglowski djaglowski merged commit eb95d08 into open-telemetry:main Aug 15, 2022
@armstrmi armstrmi deleted the mongo_atlas_logs_receiver branch August 15, 2022 15:23
@armstrmi
Copy link
Contributor Author

@djaglowski Thanks for the informative feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants