dd-trace-rb
dd-trace-rb copied to clipboard
HTTP request queuing duration
I want to measure how much a request waits in a queue until it is served by an app.
There is a way to generate traces that include the time spent in a queue. The instrumentation produces http_server.queue.duration metric. Which is not exactly I need and expect.
- Is it possible to compute queue waiting time some how from the information we have? I thought about subtracting
http_server.queue.duration
fromrack.request.duration
buthttp_server.queue.duration
filters out some traces so aggregated duration values could be skewed and we won't get accurate values. Maybe there are other options? - Maybe it's possible to add another metric which subtracts
X-Request-Start
from the time a request has arrived in an app? - Why the produced metric is called
http_server.queue.duration
even it does not compute queue waiting time? Wouldn'thttp_server.request.duration
be more accurate name?
https://docs.datadoghq.com/tracing/setup_overview/setup/ruby/#http-request-queuing https://github.com/DataDog/dd-trace-rb/blob/3cbcea6f1fd240de00200b7135c907f3fd194c9a/lib/datadog/tracing/contrib/rack/middlewares.rb#L116
Thanks!