Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why get label names and values from the /api/v1/series API, not the /api/v1/labels and /api/v1/label/…/values API ? #187

Open
chenlujjj opened this issue Jul 11, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@chenlujjj
Copy link

Hi team, is it better to use the /api/v1/labels and /api/v1/label/…/values APIs instead of /api/v1/series API to fetch label names and values when doing auto-completion in code mode and drop-down list in builder mode, because the latter requests much more data from the database, and sometimes get into timeout or hit maxSeries limit?

@Loori-R
Copy link
Contributor

Loori-R commented Jul 19, 2024

Hi, @chenlujjj! Yes, using the APIs /api/v1/labels and /api/v1/label/.../values is more optimal. In version v0.8.0, the logic for creating variables was changed to use these APIs. However, in some cases, using /api/v1/series is necessary and cannot be replaced.

@Loori-R Loori-R added the question Further information is requested label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants