Skip to content

insights: enable daily snapshots for capture group insights

Administrator requested to merge insights/capture-group-daily-snapshots into main

Created by: leonore

closes #33881 (closed)

  • No longer ignore snapshots in the compute path
  • Prune snapshots as well

Test plan

  1. Make a new capture group insight, for example file:go\.mod$ go\s*(\d\.\d+) patterntype:regexp
  2. Trigger a new snapshot by setting next_snapshot_after to NOW() in the insight_series table and restarting the worker.
  3. Observe the snapshot is recorded.
  4. 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. Screenshot 2022-04-26 at 12 09 05

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';

Merge request reports

Loading