sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Integrate interval calculation in the metrics API

Open iambriccardo opened this issue 9 months ago • 1 comments

The granularity of data stored in clickhouse varies between namespaces but also time ranges (e.g., we store 10s only for custom and the last 7 days). For this reason, if the frontend were to query data with 10s over 14 days, the backend would fail because the granularity of 10s is available only for the first 7 days.

This ticket involves the work of integrating the calculation of a new interval given a set of queries, for example, if two namespaces were to be queried with 10s and one supports at least 1m granularity, the whole interval across the queries must be normalized to 1m.

iambriccardo avatar Apr 29 '24 07:04 iambriccardo

SNS is working on the implementation of this function, which we will have to call from the metrics API code: https://www.notion.so/sentry/Metrics-layer-resolve-time-interval-mismatches-b6830ecd06534e52b66e7db64e8ed9b9#37441fb9e85842e6a3c9a2bacb6092c8

iambriccardo avatar Apr 29 '24 07:04 iambriccardo

We were not able to reproduce this now that we removed 10s granularity.

matejminar avatar May 27 '24 10:05 matejminar