-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore(explore): Migrate traces to use query params for sorts #101127
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,15 @@ export function getTargetWithReadableQueryParams( | |
updateNullableLocation(target, SPANS_MODE_KEY, writableQueryParams.mode); | ||
|
||
updateNullableLocation(target, SPANS_FIELD_KEY, writableQueryParams.fields); | ||
updateNullableLocation( | ||
target, | ||
SPANS_SORT_KEY, | ||
writableQueryParams.sortBys === null | ||
? null | ||
: writableQueryParams.sortBys?.map( | ||
sort => `${sort.kind === 'desc' ? '-' : ''}${sort.field}` | ||
) | ||
); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Query Parameters Handle Nulls and Undefines DifferentlyThe Additional Locations (1) |
||
|
||
updateNullableLocation( | ||
target, | ||
|
@@ -109,6 +118,15 @@ export function getTargetWithReadableQueryParams( | |
JSON.stringify(aggregateField) | ||
) | ||
); | ||
updateNullableLocation( | ||
target, | ||
SPANS_AGGREGATE_SORT_KEY, | ||
writableQueryParams.aggregateSortBys === null | ||
? null | ||
: writableQueryParams.aggregateSortBys?.map( | ||
sort => `${sort.kind === 'desc' ? '-' : ''}${sort.field}` | ||
) | ||
); | ||
|
||
return target; | ||
} | ||
|
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.
Bug: Aggregate Tests Use Incorrect Sort Method
Several aggregate mode tests incorrectly use
setSortBys
to update sort parameters. After recent changes,setSortBys
now controls sample sorts, so these tests should instead callsetAggregateSortBys
to update the correct state.Additional Locations (3)
static/app/views/explore/contexts/pageParamsContext/index.spec.tsx#L433-L434
static/app/views/explore/contexts/pageParamsContext/index.spec.tsx#L468-L469
static/app/views/explore/contexts/pageParamsContext/index.spec.tsx#L500-L501