-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(issue-details): Allows replays section to reflect filters #81128
base: master
Are you sure you want to change the base?
Conversation
Bundle ReportChanges will increase total bundle size by 16.32kB (0.05%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
❌ 12 Tests Failed:
View the top 3 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
export function useIssueDetailsEventCount({group}: {group: Group}) { | ||
const eventView = useIssueDetailsEventView({group}); | ||
const {data: groupStats} = useIssueDetailsDiscoverQuery<MultiSeriesEventsStats>({ | ||
params: { | ||
route: 'events-stats', | ||
eventView, | ||
referrer: 'issue_details.streamline_graph', | ||
}, | ||
}); | ||
const eventCount = useMemo(() => { | ||
if (!groupStats?.['count()']) { | ||
return 0; | ||
} | ||
return groupStats['count()']?.data?.reduce((count, [_timestamp, countData]) => { | ||
return count + (countData?.[0]?.count ?? 0); | ||
}, 0); | ||
}, [groupStats]); | ||
return eventCount; | ||
} |
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.
This kinda sucks it's the entire query for a timeseries that I iterate over to create a count.
There is definitely an easier way, but I couldn't figure out the discover syntax to get there.
Uses the issue details query to ensure replays reflect the queries set above in the new UI.
Things to do: