Merge branch '3.0.x'

This commit is contained in:
spencergibb
2021-11-01 14:37:42 -04:00
8 changed files with 195 additions and 1 deletions

View File

@@ -107,6 +107,7 @@
|spring.cloud.gateway.metrics.enabled | `false` | Enables the collection of metrics data.
|spring.cloud.gateway.metrics.prefix | `spring.cloud.gateway` | The prefix of all metrics emitted by gateway.
|spring.cloud.gateway.metrics.tags | | Tags map that added to metrics.
|spring.cloud.gateway.metrics.tags.path.enabled | `false` | If the collection of metrics data is enabled, enables an extra metric data tag by path.
|spring.cloud.gateway.predicate.after.enabled | `true` | Enables the after predicate.
|spring.cloud.gateway.predicate.before.enabled | `true` | Enables the before predicate.
|spring.cloud.gateway.predicate.between.enabled | `true` | Enables the between predicate.

View File

@@ -1944,6 +1944,10 @@ 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.
In addition, through the property `spring.cloud.gateway.metrics.tags.path.enabled` (by default, set to false), you can activate an extra metric with the tag:
* `path`: Path of the request.
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.