From ac89ef4f4c96743338c70768d55a1936d43070a8 Mon Sep 17 00:00:00 2001 From: spencergibb Date: Wed, 6 Oct 2021 19:38:28 -0400 Subject: [PATCH] Updates metrics prefix Fixes gh-2273 --- docs/src/main/asciidoc/spring-cloud-gateway.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/spring-cloud-gateway.adoc b/docs/src/main/asciidoc/spring-cloud-gateway.adoc index 4f227772..31a4a358 100644 --- a/docs/src/main/asciidoc/spring-cloud-gateway.adoc +++ b/docs/src/main/asciidoc/spring-cloud-gateway.adoc @@ -1856,7 +1856,7 @@ spring: === The Gateway Metrics Filter -To enable gateway metrics, add spring-boot-starter-actuator as a project dependency. Then, by default, the gateway metrics filter runs as long as the property `spring.cloud.gateway.metrics.enabled` is not set to `false`. This filter adds a timer metric named `gateway.requests` with the following tags: +To enable gateway metrics, add spring-boot-starter-actuator as a project dependency. Then, by default, the gateway metrics filter runs as long as the property `spring.cloud.gateway.metrics.enabled` is not set to `false`. This filter adds a timer metric named `spring.cloud.gateway.requests` with the following tags: * `routeId`: The route ID. * `routeUri`: The URI to which the API is routed. @@ -1865,7 +1865,7 @@ To enable gateway metrics, add spring-boot-starter-actuator as a project depende * `httpStatusCode`: The HTTP Status of the request returned to the client. * `httpMethod`: The HTTP method used for the request. -These metrics are then available to be scraped from `/actuator/metrics/gateway.requests` and can be easily integrated with Prometheus to create a link:images/gateway-grafana-dashboard.jpeg[Grafana] link:gateway-grafana-dashboard.json[dashboard]. +These metrics are then available to be scraped from `/actuator/metrics/spring.cloud.gateway.requests` and can be easily integrated with Prometheus to create a link:images/gateway-grafana-dashboard.jpeg[Grafana] link:gateway-grafana-dashboard.json[dashboard]. NOTE: To enable the prometheus endpoint, add `micrometer-registry-prometheus` as a project dependency.