Generate Prometheus sample metrics over pre-set intervals
Summary
This issue has been split off from #31269 (closed). We would like users to be able to take a sample from a live deployment, and then enable that on a fresh environment. They should then have what appears to be a week's worth of metrics that behaves appropriately when switching time intervals. They should be able to test out their alerts setup on this example data set.
This step is to expand the example metrics to cover our 6 pre-set time intervals (30 min, 3 hours, 8 hours, 1 day, 3 days, 1 week) so that switching between time intervals works appropriately.
Feature Roadmap
- Generate example metrics from a live deployment, and create an endpoint to serve the example metrics instead of live metrics when enabled. Issue link: #36247 (closed)
- Expand the example metrics to cover our 6 pre-set time intervals (30 min, 3 hours, 8 hours, 1 day, 3 days, 1 week) so that switching between time intervals works appropriately. Detect which time interval is being requested and return the appropriate metric data set that matches the time interval. (this issue!)
- Adjust the timestamps from the example metrics to make them appear current and live. Issue link: #36253
- Generate and load example data from custom metrics. Issue link: #36254
- Enable the use of example metrics without an actual Prometheus install. Issue link: #36255 (closed)
Edited by Kirstie Cook