On Dec 20, 2011, at 10:22 PM, Sastry Malladi wrote:
>
> >> Yes, it would require adding annotations. Without any use of an API, I'm not sure this case belongs to the spec. I think this should better be handled by implementations or other tools (like profilers).
>
> Well, I understand your position that this may not be addressed in the spec. But in reality, any organization that uses JAX-RS to deploy their services/resources, would want to monitor and measure these metrics automatically, especially in the internet world, and would need a way to do that. For example, we are doing this currently by writing a jersey response filter and approximating by subtracting MBR and MBW times and so on. I beg to differ that this is not a profiler/tooling issue
I think it's a valid use case, there's no question about that. IMO the best way to address this is via a monitoring/listener API (which some implementations support). This API could work not just around resource method invocations but also all the providers --I don't see a good reason to only support resource methods.
However, such an API is currently not in scope for JAX-RS 2.0. If you haven't done so, file it as an issue for tracking purposes.
-- Santiago