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

No globally registered metrics in pkg/querier #2210

Merged

Conversation

pracucci
Copy link
Contributor

@pracucci pracucci commented Mar 4, 2020

What this PR does:
As next step to solve #2204 and #1512 I've iterated over all metrics registered in pkg/querier and refactored the code to:

  1. Pick prometheus.Registerer in input in each component
  2. Register metrics using promauto.With()

I've also introduced a new integration test to make sure that now cortex_frontend_* and cortex_query_frontend_* metrics are exposed only by the query-frontend service (same test will be enriched in subsequent PRs once more packages will be refactored).

Which issue(s) this PR fixes:
N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci force-pushed the switch-querier-metrics-to-promauto branch from a50960b to e68892a Compare March 5, 2020 08:32
Copy link
Contributor

@pstibrany pstibrany left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for doing this cleanup, I especially like the new metrics test.

@pracucci pracucci merged commit 442db4b into cortexproject:master Mar 5, 2020
@pracucci pracucci deleted the switch-querier-metrics-to-promauto branch March 5, 2020 08:58
simonswine pushed a commit to grafana/e2e that referenced this pull request Jan 13, 2022
)

* No globally registered metrics in pkg/querier

Signed-off-by: Marco Pracucci <marco@pracucci.com>
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.

None yet

2 participants