bootique / bootique-jetty

Provides Jetty integration with Bootique

Home Page:https://bootique.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metrics signal: delta between time reported by RequestTimer and RequestLogger

andrus opened this issue · comments

Usually time reported by RequestTimer (which is a servlet listener) and RequestLogger (which is taken from Jetty) matches up to a millisecond. Sometimes it doesn't though, with RequestLogger reporting a much longer request time. This time gap may be an indicator of a client on a slow network or a general network congestion.

So let's poke around Jetty source code to confirm this hypothesis, and as we start exposing request times in metrics and healthchecks (#83), we should probably measure both, and also their delta:

  • t0: RequestTimer time - application time to finish the request
  • t1: RequestLogger time - includes t0 plus any extra time spent in Jetty (does it include the time spent in request queue as well?)
  • t1 - t0 : if bigger than a few ms, there's likely a network issue.