-
Notifications
You must be signed in to change notification settings - Fork 524
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
Add a limit parameter to search tags and tag values endpoints #4288
Comments
@joe-elliott i would like to work on this issue if you can assign me this |
I'm not quite sure this is a good first issue. It would require small/detailed changes in the query frontend, proto, querier and ingester code in order to do the basic task of limiting tags effectively. ideally it would also propagate the limitation back from the ingester/querier to the frontend so the frontend could be warned that results were cut off. i love that you jumped in when you saw something marked "good first issue", but understand if this perhaps a bit more then you were ready to try. wdyt? |
@joe, @adrapereira regarding limiting the Tags endpoint. This endpoint returns the tags for the different scopes: resource, event, links etc. If we just count the number of tags we could end with only one scope populated ie:
Also, the order is not guaranteed, so we could get A possibility would be to use the limit per scope. So if we set the limit to What do you think? |
Do the intrinsics matter for this limit? There will never be a way for the intrinsics list to be large enough for it to matter in my opinion. I'm not against the limit being per scope, I feel like it's the less confusing option. |
Yeah, intrinsic don't really matter, but i'm also fine with the "per scope" interpretation for the tags endpoint. |
There are currently a few server side options that can be set to limit the impact of tag and tag value queries:
max_bytes_per_tag_values_query
max_blocks_per_tag_values_query
However, it's likely a user of Tempo may want to purposefully limit the number of tags returned on large queries. Let's add a query parameter allowing the caller of Tempo to indicate the maximum number of results they would like to see.
/api/v2/searc/tags?limit=<int>
/api/v2/search/tag/<tag>/values?limit=<int>
The text was updated successfully, but these errors were encountered: