Merge branch '3.0.x'
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user