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 prometheus-prefixed buildinfo endpoint to ruler #2724

Merged
merged 3 commits into from
Aug 16, 2022

Conversation

dimitarvdimitrov
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov commented Aug 15, 2022

Signed-off-by: Dimitar Dimitrov dimitar.dimitrov@grafana.com

What this PR does

Adds the /prometheus-prefixed buildinfo endpoint to the ruler. This endpoint is exposed by all other components (querier, query-frontend) that use the <prometheus-http-prefix>, except the ruler.

Which issue(s) this PR fixes or relates to

Fixes #2678

Checklist

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

CHANGELOG.md Show resolved Hide resolved
Copy link
Member

@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.

Thank you!

pkg/api/api.go Outdated
@@ -290,6 +290,7 @@ func (a *API) RegisterRuler(r *ruler.Ruler) {

// List all user rule groups
a.RegisterRoute("/ruler/rule_groups", http.HandlerFunc(r.ListAllRules), false, true, "GET")
a.RegisterRoute(path.Join(a.cfg.PrometheusHTTPPrefix, "/api/v1/status/buildinfo"), buildInfoHandler, false, true, "GET")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be moved to RegisterRulerAPI(), which is where Prometheus-compatible APIs are expected to be registered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in 1b3f213

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@pracucci pracucci enabled auto-merge (squash) August 16, 2022 09:22
@pracucci pracucci merged commit b3bc0ab into main Aug 16, 2022
@pracucci pracucci deleted the dimitar/add-buildinfo-to-ruler branch August 16, 2022 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buildinfo with prometheus prefix is only exposed by the queriers and query-frontends
3 participants