-
Notifications
You must be signed in to change notification settings - Fork 421
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
new metrics #576
base: main
Are you sure you want to change the base?
new metrics #576
Conversation
Hi, @dbernstein1 thanks for the contribution. Could you provide information on what this PR is about and what problem you are fixing here? Thanks |
exporter/v1_compatibility.go
Outdated
func chunksTotal(ctx context.Context, client *mongo.Client) (prometheus.Metric, error) { | ||
n, err := client.Database("config").Collection("chunks").CountDocuments(ctx, bson.M{}) | ||
if err != nil { | ||
@ -1200,9 +1317,26 @@ func chunksTotal(ctx context.Context, client *mongo.Client) (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.
this line looks pretty weird
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.
Yeah sorry fixed it
Also I tried running make format but got these issues:
go mod tidy
go mod tidy: go.mod file indicates go 1.17, but maximum supported version is 1.16
make: *** [format] Error 1
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.
What version of golang do you have locally?
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.
1.16.5
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 update to at least 1.17.
4f741a9
to
97660e6
Compare
|
b7c7d00
to
3fbd7b9
Compare
3fbd7b9
to
3563998
Compare
metric, err := prometheus.NewConstMetric(d, prometheus.GaugeValue, float64(running)) | ||
|
||
return metric, err |
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.
metric, err := prometheus.NewConstMetric(d, prometheus.GaugeValue, float64(running)) | |
return metric, err | |
return prometheus.NewConstMetric(d, prometheus.GaugeValue, float64(running)) |
exporter/v1_compatibility.go
Outdated
func chunksTotal(ctx context.Context, client *mongo.Client) (prometheus.Metric, error) { | ||
n, err := client.Database("config").Collection("chunks").CountDocuments(ctx, bson.M{}) | ||
if err != nil { | ||
@ -1200,9 +1317,26 @@ func chunksTotal(ctx context.Context, client *mongo.Client) (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.
Please update to at least 1.17.
@dbernstein1 please sign the CLA |
@BupycHuk I already did but it is showing up that I didn’t |
Hi @dbernstein1 your commits signed with |
@BupycHuk I added dabernst@cisco.com to my github account. Tried signing the CLA again |
@dbernstein1 @BupycHuk CLA problem has gone. |
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.
Hi @dbernstein1, Thank you for your contribution and fixing a problem with CLA.
v1_compatibilty collector is supposed to be a collector to keep compatibility with mongodb_exporter v1. For new metrics it's better to create a new collector.
PMM-XXXX (optional, if ticket reported)
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 or Discord.