-
Notifications
You must be signed in to change notification settings - Fork 62
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
Custom Traces- Sorting/Toast #2397
Conversation
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
@@ -95,43 +101,40 @@ export function TracesContent(props: TracesProps) { | |||
|
|||
setSortingColumns(sortColumns); | |||
|
|||
const localOnlyFields = ['trace_group', 'percentile_in_trace_group', 'trace_id']; |
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.
maybe add some comments to explain what local only means, for future reference
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.
Added comment
// The columns that can not be used in a query, only rendered on page
page | ||
); | ||
|
||
const isUnderOneHour = datemath.parse(endTime)?.diff(datemath.parse(startTime), 'hours')! < 1; |
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.
util functions like this can be extracted, i see the same logic is also used in other places
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.
added helper function isUnderOneHourRange
export const isUnderOneHourRange = (startTime: string, endTime: string): boolean => {
const start = dateMath.parse(startTime);
const end = dateMath.parse(endTime);
if (!start || !end) return false;
return end.diff(start, 'hours')! < 1;
};
Signed-off-by: Adam Tackett <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2397 +/- ##
==========================================
- Coverage 56.53% 55.88% -0.65%
==========================================
Files 393 397 +4
Lines 15574 16061 +487
Branches 4284 4467 +183
==========================================
+ Hits 8804 8976 +172
- Misses 6705 7015 +310
- Partials 65 70 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Before with invalid/empty span


After
Invalid sorting that required it to be local only:

Issues Resolved
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.