-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add client wrapper for MongoDB Atlas support #5386
Add client wrapper for MongoDB Atlas support #5386
Conversation
b385ed5
to
87c30de
Compare
Please resolve the conflicts. |
82146e3
to
be380cd
Compare
@jpkrohling I think I addressed your concerns- is this looking right to you? |
I'll review this again tomorrow morning, sorry for the delay. |
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, just please confirm that the print in the stub func at the mongodb_atlas_client should still be like it is.
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.
Please rebase since the core receiver changed to use scraperhelper.
Adds pagination, error handling, will be extended to manage metric transformation.
MongoDB Atlas wrapper returns errors rather than logging change resource attributes to use conventions modify error handling
be380cd
to
d09dc67
Compare
Rebased on scraperhelper updates from main, will defer adding logging support until a future date after discussing with @bogdandrutu. |
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.
@bogdandrutu do you have other comments on scraper or good to merge?
for _, org := range s.client.Organizations(ctx) { | ||
// Metrics collection starts here | ||
s.log.Debug("fetch resources for MongoDB Organization", zap.String("org", org.Name)) | ||
func (s *receiver) poll(ctx context.Context, start string, end string, resolution string) (pdata.Metrics, error) { |
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.
Nit: large func, difficult to read. Consider refactoring to smaller bit in a future PR.
Description:
Adds pagination, error handling, will be extended to manage metric
transformation.