You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2161,9 +2161,9 @@ Alternatively, when set to `false`, you can enable instrumentation by adding `@T
2161
2161
2162
2162
}
2163
2163
----
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`.
2165
2165
<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.
2167
2167
<3> A method with `longTask = true` to enable a long task timer for the method.
2168
2168
Long task timers require a separate metric name, and can be stacked with a short task timer.
2169
2169
@@ -2199,9 +2199,12 @@ TIP: In some cases, exceptions handled in Web controllers are not recorded as re
2199
2199
Applications can opt-in and record exceptions by <<spring-boot-features.adoc#boot-features-error-handling, setting handled exceptions as request parameters>>.
2200
2200
2201
2201
2202
+
2202
2203
[[production-ready-metrics-web-flux]]
2203
2204
==== Spring WebFlux Metrics
2204
2205
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.
2205
2208
2206
2209
By default, metrics are generated with the name `http.server.requests`.
2207
2210
You can customize the name by setting the configprop:management.metrics.web.server.request.metric-name[] property.
0 commit comments