-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore(timeseries): Improve comparison logic #101194
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
Conversation
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.
Lgtm! I like this effort in getting all these types to be 100% accurate too
const timeSeriesResult = useFetchEventsTimeSeries( | ||
dataset ?? DiscoverDatasets.SPANS, |
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.
I kinda liked how we used to have a hook for each dataset. We could alternatively do useFetchSpanTImeSeries
, and useFetchLogTimeSeries
. I like the little abstraction, imo in code your likely thinking "i wanna fetch a span time series", not "I wanna fetch an events timeseries", although usability wise its pretty much the same.
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 still have the hook for each dataset! useSortedTimeSeries
uses the type-less one though, because it's used for both logs and traces
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
A few more improvements to the comparison algorith. This loosens the comparison criteria somewhat, and improves some of the behaviour.
groupBy
type and docsgroupBy
parsingdataScanned
in comparator