-
Notifications
You must be signed in to change notification settings - Fork 450
[FB] PMM-7424 db stats in mongo exporter #334
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
Conversation
| "github.com/percona/mongodb_exporter/internal/tu" | ||
| ) | ||
|
|
||
| func TestDBStatsCollector(t *testing.T) { |
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.
🚫 [golangci-lint] reported by reviewdog 🐶
Function 'TestDBStatsCollector' is too long (77 > 60) (funlen)
|
|
||
| ti := labelsGetterMock{} | ||
|
|
||
| c := &dbstatsCollector{ |
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.
🚫 [golangci-lint] reported by reviewdog 🐶
ctx, compatibleMode are missing in dbstatsCollector (exhaustivestruct)
| dbNames, err := d.client.ListDatabaseNames(d.ctx, bson.M{}) | ||
| if err != nil { | ||
| d.logger.Errorf("Failed to get database names: %s", err) | ||
| return |
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.
🚫 [golangci-lint] reported by reviewdog 🐶
return with no blank line before (nlreturn)
| err := r.Decode(&dbStats) | ||
| if err != nil { | ||
| d.logger.Errorf("Failed to get $dbstats for database %s: %s", db, err) | ||
| continue |
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.
🚫 [golangci-lint] reported by reviewdog 🐶
continue with no blank line before (nlreturn)
PMM-7424 Add dbStats-based metric to mongodb_exporter v0.20+
This is a draft PR to be able to create a feature build for a 3rd party contribution.
DO NOT MERGE
Feature buiild: pmm-submodules PR #1982