metrics
metrics copied to clipboard
Fix metrics for `InstrumentedEE10Handler`
As described in #3917, the InstrumentedEE10Handler doesn't properly collect metrics in some cases, e.g. when a Jersey method returns a completed CompletableFuture.
This PR performs the response metrics update after the Jetty Callback finishes, i.e. the response is committed. This simplifies the logic between synchronous and asynchronous requests.
Fixes #3917