-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(insights): Add sort
parameter to support to span samples endpoint
#89230
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
gggritso
merged 3 commits into
master
from
georgegritsouk/dain-187-add-ordering-parameter-to-span-samples-endpoint
Apr 10, 2025
Merged
feat(insights): Add sort
parameter to support to span samples endpoint
#89230
gggritso
merged 3 commits into
master
from
georgegritsouk/dain-187-add-ordering-parameter-to-span-samples-endpoint
Apr 10, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mjq
approved these changes
Apr 10, 2025
wmak
approved these changes
Apr 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We filter by id first before the orderby so it should... be ok 👍
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
gggritso
added a commit
that referenced
this pull request
Apr 11, 2025
There are two `useSpanSamples` hooks. One from the HTTP panel, and one "generic" one, used for Queries, Assets, Mobile, etc. The second "generic" one is more fancy, since it calculates its own bounds. I'm going to combine the two hooks soon to eliminate the duplication, but this is a first step to unblock some other work. - add types to `additionalFields`. This also improves type safety of the responses - align the parameters passed to `useApiQuery` from the two hooks. They used to have different stale time and behaviour for some reason - have both the `useSpanSamples` hooks return data _and_ meta. Without meta, I can't plot these samples on new charts, so this unlocks that behaviour - remove manual sorting from the hook. One of the hooks manually sorted the samples by duration. This is not necessary as of #89230 (so, I need to wait for that PR before I deploy this)
andrewshie-sentry
pushed a commit
that referenced
this pull request
Apr 22, 2025
…int (#89230) Right now the results are always sorted by timestamp, and the frontend sometimes manually sorts them by duration. That seems strange, why not just support sorting on the backend instead?
andrewshie-sentry
pushed a commit
that referenced
this pull request
Apr 22, 2025
There are two `useSpanSamples` hooks. One from the HTTP panel, and one "generic" one, used for Queries, Assets, Mobile, etc. The second "generic" one is more fancy, since it calculates its own bounds. I'm going to combine the two hooks soon to eliminate the duplication, but this is a first step to unblock some other work. - add types to `additionalFields`. This also improves type safety of the responses - align the parameters passed to `useApiQuery` from the two hooks. They used to have different stale time and behaviour for some reason - have both the `useSpanSamples` hooks return data _and_ meta. Without meta, I can't plot these samples on new charts, so this unlocks that behaviour - remove manual sorting from the hook. One of the hooks manually sorted the samples by duration. This is not necessary as of #89230 (so, I need to wait for that PR before I deploy this)
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now the results are always sorted by timestamp, and the frontend sometimes manually sorts them by duration. That seems strange, why not just support sorting on the backend instead?