loki icon indicating copy to clipboard operation
loki copied to clipboard

Store request latency metrics

Open sandeepsukhani opened this issue 2 years ago • 1 comments

What this PR does / why we need it: We currently only have index request latency metrics on individual store types i.e boltdb-shipper, tsdb, bigtable etc. This makes it hard to instrument dashboards when we change the store type. This PR adds a metric to measure the overall index request latency irrespective of the underlying store type.

Special notes for your reviewer:

  • The metric tracks the latency across all the stores, so if a query spans multiple stores, it measures the total latency from all the stores. A single query would rarely span multiple stores after splitting, so it should not be a big deal.
  • The metric only measures index query latency and not the write latency. For measuring just the write latency, I need to refactor some code so left a todo for it and will do a follow up PR.

sandeepsukhani avatar Aug 11 '22 10:08 sandeepsukhani

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

grafanabot avatar Aug 11 '22 10:08 grafanabot