diff --git a/docs/src/main/asciidoc/spring-cloud-gateway.adoc b/docs/src/main/asciidoc/spring-cloud-gateway.adoc index 6650e8f4..f1e33335 100644 --- a/docs/src/main/asciidoc/spring-cloud-gateway.adoc +++ b/docs/src/main/asciidoc/spring-cloud-gateway.adoc @@ -1902,7 +1902,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. @@ -1911,7 +1911,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. diff --git a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java index 48abef09..65ae4adb 100644 --- a/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java +++ b/spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/test/CustomBlockHoundIntegration.java @@ -87,7 +87,10 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration { "org.springframework.security.authentication.AbstractUserDetailsReactiveAuthenticationManager", "lambda$authenticate$4"); + // Uses java.io.RandomAccessFile#readBytes builder.allowBlockingCallsInside("org.springframework.context.annotation.ConfigurationClassParser", "parse"); + builder.allowBlockingCallsInside( + "org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader", "loadBeanDefinitions"); builder.allowBlockingCallsInside("org.springframework.core.type.classreading.SimpleMetadataReader", "getClassReader"); }