Skip to content
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 faillint paths to reject global prometheus metrics #18

Merged
merged 8 commits into from
Aug 27, 2021

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]

Makefile Outdated Show resolved Hide resolved
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?

Makefile Outdated Show resolved Hide resolved
kv/memberlist/kv_init_service.go Outdated Show resolved Hide resolved
kv/memberlist/kv_init_service.go Outdated Show resolved Hide resolved
services/basic_service.go Outdated Show resolved Hide resolved
services/basic_service.go Outdated Show resolved Hide resolved
services/service.go Outdated Show resolved Hide resolved
services/service.go Outdated Show resolved Hide resolved
services/services.go Outdated Show resolved Hide resolved
services/services.go Outdated Show resolved Hide resolved
services/services.go Outdated Show resolved Hide resolved
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?

services/service.go Outdated Show resolved Hide resolved
@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.

Makefile Outdated Show resolved Hide resolved
@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