Skip to content

ui: replace deprecated InstrumentHandler() #1302

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

Conversation

simonpasquier
Copy link
Member

This change is similar to prometheus/prometheus#3862. It should probably wait for v0.15.0 to be out.

The following metrics are removed:

  • http_request_duration_microseconds (Summary).
  • http_request_size_bytes (Summary).
  • http_requests_total (Counter).

And the following metrics are added instead:

  • alertmanager_http_request_duration_seconds (Histogram).
  • alertmanager_http_response_size_bytes (Histogram).
  • promhttp_metric_handler_requests_in_flight (Gauge).
  • promhttp_metric_handler_requests_total (Counter).

This change replaces the deprecated InstrumentHandler function by
the equivalent functions from the promhttp package.

The following metrics are removed:

* http_request_duration_microseconds (Summary).
* http_request_size_bytes (Summary).
* http_requests_total (Counter).

And the following metrics are added instead:

* alertmanager_http_request_duration_seconds (Histogram).
* alertmanager_http_response_size_bytes (Histogram).
* promhttp_metric_handler_requests_in_flight (Gauge).
* promhttp_metric_handler_requests_total (Counter).
Copy link
Contributor

@stuartnelson3 stuartnelson3 left a comment

Choose a reason for hiding this comment

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

Looks good. Question on the naming:

Why did you use alertmanager_http_request_duration_seconds in this PR, but in the prometheus PR you used http_request_duration_seconds?

@brian-brazil
Copy link
Contributor

It's prometheus_http_request_duration_seconds in Prometheus.

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

3 participants