This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Description
Metrictank publishes a lot of metrics around cache hits, timings, etc. but while optimizing / analyzing individual queries, a lot of this gets lost. Jaeger is somewhat helpful but not sufficient for a variety of reasons (request volume, sampling, etc).
It would be nice if there could be a flag to indicate that stats should be returned with the response that can aid in figuring out what was triggered by this request. Some useful stats might be:
- Time spent resolving the targets into a concrete list of series
- Time spent fetching the data
- Cache usage (tank, chunk cache, cassandra) plus timings
- Pre-run logic (mergeSeries, sorting, etc)
- Plan run time
- The number of points pulled in, the number of points returned, the series pulled in.
Most of these stats are already collected for Jaeger and/or publishing as aggregate metrics.