Skip to content

insights: Limit inline prototype queries to 50

Warren Gifford requested to merge insights/limit-related into main

Created by: CristinaBirkel

Description

This prototype doesn't scale to hundreds of series, which is what we have on k8s and demo. This should have minimal impact on customers. This will allow the endpoint to return without timing out.

This returns the 50 most recently created series, to allow for a demo workflow of creating a new insight and then seeing it appear inline in search.

Test plan

I tested this by printing to the console what series were being queried for based on the new limiting function, and in the right order. I set the limit to a high number to ensure it was handling out-of-bounds correctly, and a lower number to see it doing the limiting.

Merge request reports

Loading