grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

SceneQueryRunner: Limit concurrent requests #842

Closed gtk-grafana closed 2 months ago

gtk-grafana commented 2 months ago

Why: We want to limit the number of concurrent requests being made to loki in the Explore Logs app.

What: Adding a singleton to the SceneQueryRunner which inits the p-limit concurrency queue, for instances of SceneQueryRunner that have the concurrency options defined.

How: Allow passing in of new concurrency options to the SceneQueryRunner.

Todo: How does it work with query splitting?

gtk-grafana commented 2 months ago

Converting a observable to a promise will prevent any state change in the observable besides the final one.

torkelo commented 2 months ago

Grafana backendSrv already limits requests to 5 concurrent I think