Skip to content

Conversation

@treid314
Copy link
Contributor

@treid314 treid314 commented Aug 19, 2021

This covers metrics registered with prometheus.{NewCounter,NewCounterVec,NewCounterVec,NewGauge,NewGaugeVec,NewGaugeFunc,\ NewHistorgram,NewHistogramVec,NewSummary,NewSummaryVec} and will suggest to use promauto.With() to register metrics to prevent registering of global metrics. We will also fail on prometheus.MustRegister() calls as metrics should be registered automatically with promauto.

Signed-off-by: Tyler Reid [email protected]

pracucci
pracucci previously approved these changes Aug 19, 2021
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! But we need to get CI passes fixing issues before merging.

@treid314
Copy link
Contributor Author

Vendor went off, let me fix that

Copy link
Collaborator

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks as if there are some typos, dupes in the faillint config?

Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are all the functions comments changes related to this PR?

@pracucci pracucci self-requested a review August 20, 2021 13:31
@pracucci pracucci dismissed their stale review August 20, 2021 13:32

Don't understand why unrelated comments have changed in this PR.

@treid314
Copy link
Contributor Author

The comments were failing golang ci lint, so I wanted to fix that with the other linter issues as I went. But you're right, I'll pull it to a different PR since it doesn't make sense here.

Tyler Reid added 2 commits August 23, 2021 10:33
Signed-off-by: Tyler Reid <[email protected]>
@treid314 treid314 requested a review from aknuds1 August 23, 2021 16:02
Copy link
Collaborator

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's duplication in the lint rules.

@treid314 treid314 mentioned this pull request Aug 25, 2021
Signed-off-by: Tyler Reid <[email protected]>
@treid314 treid314 requested a review from aknuds1 August 27, 2021 14:04
Copy link
Collaborator

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@treid314
Copy link
Contributor Author

Let there be Lint!

@treid314 treid314 merged commit 918b9f1 into grafana:main Aug 27, 2021
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.

3 participants