-
Notifications
You must be signed in to change notification settings - Fork 419
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
PMM-9403 Add extra label for replicaset metrics #804
Conversation
@@ -999,8 +999,8 @@ func oplogStatus(ctx context.Context, client *mongo.Client) ([]prometheus.Metric | |||
return []prometheus.Metric{headMetric, tailMetric}, nil | |||
} | |||
|
|||
func replSetMetrics(m bson.M) []prometheus.Metric { | |||
replSetGetStatus, ok := m["replSetGetStatus"].(bson.M) | |||
func replSetMetrics(d bson.M) []prometheus.Metric { |
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 'replSetMetrics' has too many statements (41 > 40) (funlen)
@@ -999,8 +999,8 @@ func oplogStatus(ctx context.Context, client *mongo.Client) ([]prometheus.Metric | |||
return []prometheus.Metric{headMetric, tailMetric}, nil | |||
} | |||
|
|||
func replSetMetrics(m bson.M) []prometheus.Metric { | |||
replSetGetStatus, ok := m["replSetGetStatus"].(bson.M) | |||
func replSetMetrics(d bson.M) []prometheus.Metric { |
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.
Just out of curiosity. Why "d"? Since it is bson.M not bson.D.
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.
because it's diagnostic data
, needed some other variable, because m
was reused below for members.
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.
Got it. Thanks
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.
@ademidoff let's do it in a separate PR |
PMM-9403 (optional, if ticket reported)
FB
Below we provide a basic checklist of things that would make it a good PR:
Once all checks pass and the code is ready for review, please add
pmm-review-exporters
team as the reviewer. That would assign people from the review team automatically. Report any issues on our Forum.