Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for the monitoring jetty9 async servlet requests. #715

Closed

Conversation

tempredirect
Copy link

Async requests are monitored via the addition of an async listener.
The bug was that onStartAsync(AsyncEvent) is called when the handler
invokes startAsync() but the InstrumentedHandler only added the
listener after the call to the delegate handler, thus would miss
the all onStartAsync event.

The net result of the bug was that the start time of all async requests
was reported as 0 so the calculated elapsed times where then rather
large (i.e. currentTimeMillis()).

@tempredirect
Copy link
Author

Any chance somebody can have a quick look at this please?

@tempredirect
Copy link
Author

Have rebased this request against master.

Async requests are monitored via the addition of an async listener.
The bug was that `onStartAsync(AsyncEvent)` is called when the handler
invokes `startAsync()` but the `InstrumentedHandler` only added the
listener after the call to the delegate handler, thus would miss
the all onStartAsync event.

The net result of the bug was that the start time of all async requests
was reported as 0 so the calculated elapsed times where then rather
large (i.e. currentTimeMillis()).
@tempredirect
Copy link
Author

Hi, anybody fancy having a look at this??

@ryantenney
Copy link
Contributor

@tempredirect I'm afraid I'm not terribly knowledgable about Jetty. I've been hoping that someone who is more knowledgable would come along and sign off on this PR!

@uwemaurer
Copy link

I can confirm that InstrumentedHandler is currently not working with async servlets and this change fixes it.
I suggest to merge this fix.

This will also solve #914

@jonathanmgrimm
Copy link

jonathanmgrimm commented Apr 27, 2016

Can also confirm this fixes the same problem as others are seeing. EDIT - this definitely causes a reasonable number to be reported but I'm not sure if it is the right one. The metric reported does not seem to be the same as that coming from the Jetty request log. In my environment, over an hour window the average response latency from the Jetty request log is 287 ms, but the metric reported with this fix is more like 140ms.

@mziemba
Copy link

mziemba commented Jun 28, 2016

I have the same issue, are there any plans on merging this PR?

@ryantenney
Copy link
Contributor

@jonathanmgrimm have you had a chance to look into this any further? I was going to merge it, but your comment concerns me.

@ryantenney
Copy link
Contributor

Merging to 3.2 in #1074

@ryantenney ryantenney closed this Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants