Skip to content

Commit 7a636e5

Browse files
committed
Update @timed WebFlux documentation
Closes gh-23112
1 parent 78aa523 commit 7a636e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2161,9 +2161,9 @@ Alternatively, when set to `false`, you can enable instrumentation by adding `@T
21612161
21622162
}
21632163
----
2164-
<1> A controller class to enable timings on every request handler in the controller.
2164+
<1> A controller class to enable timings on every request handler in the controller not directly annotated with `@Timed`.
21652165
<2> A method to enable for an individual endpoint.
2166-
This is not necessary if you have it on the class, but can be used to further customize the timer for this particular endpoint.
2166+
This is not necessary if you have it on the class, but can be used to customize the timer for this particular endpoint.
21672167
<3> A method with `longTask = true` to enable a long task timer for the method.
21682168
Long task timers require a separate metric name, and can be stacked with a short task timer.
21692169

@@ -2199,9 +2199,12 @@ TIP: In some cases, exceptions handled in Web controllers are not recorded as re
21992199
Applications can opt-in and record exceptions by <<spring-boot-features.adoc#boot-features-error-handling, setting handled exceptions as request parameters>>.
22002200

22012201

2202+
22022203
[[production-ready-metrics-web-flux]]
22032204
==== Spring WebFlux Metrics
22042205
Auto-configuration enables the instrumentation of all requests handled by WebFlux controllers and functional handlers.
2206+
When `management.metrics.web.server.request.autotime.enabled` is `true`, this instrumentation occurs for all requests.
2207+
Alternatively, when set to `false`, you can enable instrumentation by adding `@Timed` to a request-handling method in the same way the Spring MVC example above.
22052208

22062209
By default, metrics are generated with the name `http.server.requests`.
22072210
You can customize the name by setting the configprop:management.metrics.web.server.request.metric-name[] property.

0 commit comments

Comments
 (0)