VictoriaMetrics / victoriametrics-datasource

Grafana datasource for VictoriaMetrics
GNU Affero General Public License v3.0
111 stars 14 forks source link

Sluggish label filtering when thousands of possible label values #206

Closed 0lionelzhang0 closed 1 month ago

0lionelzhang0 commented 1 month ago

Hello!

Thank you for this Grafana plugin, it has been immensely useful!

While using the query "Builder" and using the dropdown to add a new label, the performance seems to be sluggish when there are thousands of possible label values. More specifically, I choose a label name, then start typing the label value and since there are thousands of label values to filter through it appears to slow things down. Is there a way to limit the number of returned label values as one types it in?

For what it's worth, I don't experience any performance slowdowns when using the "Metrics browser" under "Code" instead of "Builder".

Thanks, Lionel

Loori-R commented 1 month ago

Hello, @0lionelzhang0!

You can adjust the limits on the data source settings page. At the end of the settings, there is a Limits section where you can restrict the number of returned label values.

This functionality is supported starting from version v0.4.0. You can find more details in the release of version v0.4.0 and in the description of the pull request #91.

I hope this helps resolve your issue.

0lionelzhang0 commented 1 month ago

Thank you @Loori-R!