insights: enable daily snapshots for capture group insights
Created by: leonore
closes #33881 (closed)
- No longer ignore snapshots in the compute path
- Prune snapshots as well
Test plan
- Make a new capture group insight, for example
file:go\.mod$ go\s*(\d\.\d+) patterntype:regexp
- Trigger a new snapshot by setting
next_snapshot_after
toNOW()
in theinsight_series
table and restarting the worker. - Observe the snapshot is recorded.
- Repeat step 2 and observe the snapshots table is pruned correctly.
The following screenshot shows a capture group insight compared to a standard one. The last data point comes from a snapshot. The last two data points are close together due to their timestamp (2022-04-25 and 2022-04-26). We can see this applies in both cases.
This query fetches snapshots for capture group insights:
SELECT
*
FROM
series_points_snapshots sps
JOIN insight_series ise ON ise.series_id = sps.series_id
WHERE
ise.generation_method = 'search-compute';