Skip to content

ui: replace deprecated InstrumentHandler()#1302

Merged
stuartnelson3 merged 1 commit intoprometheus:masterfrom
simonpasquier:remove-deprecated-instrumentation
Mar 28, 2018
Merged

ui: replace deprecated InstrumentHandler()#1302
stuartnelson3 merged 1 commit intoprometheus:masterfrom
simonpasquier:remove-deprecated-instrumentation

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.

3 participants