Hi Zack, you could write a Handler for Jetty, similar to the one used in Dropwizard/Dropwizard Metrics [1] to get the metrics you want.
[1]: https://github.com/dropwizard/metrics/blob/v4.1.16/metrics-jetty9/src/main/java/com/codahale/metrics/jetty9/InstrumentedHandler.java <https://github.com/dropwizard/metrics/blob/v4.1.16/metrics-jetty9/src/main/java/com/codahale/metrics/jetty9/InstrumentedHandler.java> Best regards, Jochen > Am 17.12.2020 um 01:16 schrieb Zack Sampson <[email protected]>: > > Hey all, > > I've wondered how to do this for years and have never quite managed to figure > it out. For the purpose of metrics, I'd like to wrap a request such that I > get the chance to, say, increment a counter while it runs, and then decrement > it after it completes. Unlike a ContainerResponseFilter, I don't want to > decrement until the body completes, if there is one. > > Is there a better way to do this than by frankensteining together an > interceptor and request filters? > > Thank you! > Zack -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dropwizard-user/F21A5388-4DCD-42E2-A820-E9165EC4B3AE%40schalanda.name.
