Declare order for ServerHttpObservationFilter WebFilter

This commit declares an `@Order` for the `ServerHttpObservationFilter`
bean declaration in the Observation WebFlux auto-configuration.

This allows developers to consistently order other `WebFilter` instances
relatively to this one. Here, `@Order(Ordered.HIGHEST_PRECEDENCE + 1)`
has been chosen to align with the order of its MVC counterpart.

Fixes gh-33444
This commit is contained in:
Brian Clozel
2022-12-19 18:24:36 +01:00
parent fcf120783a
commit 28f9f20d39
3 changed files with 42 additions and 0 deletions

View File

@@ -207,6 +207,9 @@ When it does so, the orders shown in the following table will be used:
|===
| Web Filter | Order
| `ServerHttpObservationFilter` (Micrometer Observability)
| `Ordered.HIGHEST_PRECEDENCE + 1`
| `WebFilterChainProxy` (Spring Security)
| `-100`