Skip to content

Commit f3c7038

Browse files
committed
Fixing property names
1 parent bf95959 commit f3c7038

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/global-filters.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ This filter adds a timer metric named `spring.cloud.gateway.requests` with the f
5252
* `httpStatusCode`: The HTTP Status of the request returned to the client.
5353
* `httpMethod`: The HTTP method used for the request.
5454

55-
In addition, through the `spring.cloud.gateway.metrics.path-tags.enabled` property (by default, `false`), you can activate an extra metric with the path tag:
55+
In addition, through the `spring.cloud.gateway.server.webflux.metrics.path-tags.enabled` property (by default, `false`), you can activate an extra metric with the path tag:
5656

5757
* `path`: The path of the request.
5858

59-
WARNING: The property `spring.cloud.gateway.metrics.tags.path.enabled` will also add the above metric but has the side effect of the value ending up as a tag. This property is deprecated and will be removed in a future release.
59+
WARNING: The property `spring.cloud.gateway.server.webflux.metrics.tags.path.enabled` will also add the above metric but has the side effect of the value ending up as a tag. This property is deprecated and will be removed in a future release.
6060

6161
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].
6262
You can also alarm with these useful metrics to take an example from link:gateway-alarming.adoc[alarming-template].

spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/GatewayMetricsAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public GatewayHttpTagsProvider gatewayHttpTagsProvider() {
7373
// TODO: remove support for the property `metrics.tags.path.enabled` in the next major
7474
@Bean
7575
@ConditionalOnExpression("'${" + GatewayProperties.PREFIX + ".metrics.tags.path.enabled:false}' == 'true' || '${"
76-
+ GatewayProperties.PREFIX + ".metrics.path-tags-provider.enabled:false}' == 'true'")
76+
+ GatewayProperties.PREFIX + ".metrics.path-tags.enabled:false}' == 'true'")
7777
public GatewayPathTagsProvider gatewayPathTagsProvider() {
7878
return new GatewayPathTagsProvider();
7979
}

spring-cloud-gateway-server/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,6 +2444,22 @@
24442444
"replacement": "spring.cloud.gateway.server.webflux.trusted-proxies",
24452445
"since": "4.3.0"
24462446
}
2447+
},
2448+
{
2449+
"name": "spring.cloud.gateway.server.webflux.metrics.tags.path.enabled",
2450+
"type": "java.lang.Boolean",
2451+
"description": "Enables the gateway path tag provider.",
2452+
"defaultValue": "false",
2453+
"deprecation": {
2454+
"reason": "Setting this property to true will cause the path tag to be added to all metrics.",
2455+
"replacement": "spring.cloud.gateway.server.webflux.metrics.path-tags.enabled"
2456+
}
2457+
},
2458+
{
2459+
"name": "spring.cloud.gateway.server.webflux.metrics.path-tags.enabled",
2460+
"type": "java.lang.Boolean",
2461+
"description": "Enables the gateway path tag provider.",
2462+
"defaultValue": "false"
24472463
}
24482464
]
24492465
}

0 commit comments

Comments
 (0)