spring-framework/spring-web
Phillip Webb f93fda2a95 Guard against no-op observation
Update `ServerHttpObservationFilter` to check if the `Observation`
is a no-op before adding the `ServerRequestObservationContext`.

Prior to this commit, if the `Observation` is a no-op then the
context type added with the `CURRENT_OBSERVATION_CONTEXT_ATTRIBUTE`
would not be a `ServerRequestObservationContext`. This would mean
that `findObservationContext` would throw a `ClassCastException`.

Fixes gh-29356
2022-10-19 16:01:09 -07:00
..
src Guard against no-op observation 2022-10-19 16:01:09 -07:00
spring-web.gradle Support CBOR and Protobuf with Kotlin Serialization 2022-10-06 13:51:50 +02:00