Skip to content
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

feat(insights): Hide healthy Session Health counts & rates by default #87252

Merged
merged 5 commits into from
Mar 18, 2025

Conversation

ryan953
Copy link
Member

@ryan953 ryan953 commented Mar 17, 2025

This PR re-labels the charts and series so that the series names are shorter, less redundant. As a consequence the chart titles are longer again.

The charts also hide the "healthy" series of data by default, users can click the legend to toggle that series though.

Toggling a series in one chart will affect all charts when the series name is the same. All the names are consistent now between all the charts.

SCR-20250318-lzex

@ryan953 ryan953 requested review from a team as code owners March 17, 2025 23:16
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 17, 2025
@ryan953 ryan953 changed the title Ryan953/insights session health hide healthy feat(insights): Hide healthy Session Health counts & rates by default Mar 17, 2025
@ryan953 ryan953 requested a review from a team March 17, 2025 23:19
@michellewzhang michellewzhang requested a review from bcoe March 18, 2025 00:07
@@ -471,7 +471,7 @@ export default storyBook('TimeSeriesWidgetVisualization', (story, APIReference)

story('Legends', () => {
const [legendSelection, setLegendSelection] = useState<LegendSelection>({
'p99(span.duration)': false,
Copy link
Member

@michellewzhang michellewzhang Mar 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this get changed 👀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the series in the chart is called p99, so having p99(span.duration) in the state by default did nothing to hide data.

Now when the story loads you can see the json printed {p99: false} while the chart has 2 series in the legend, but only one series is rendered.

I think it's more obvious this way that the legendSelection prop is working properly without having to click first.

@ryan953 ryan953 requested review from gggritso and removed request for bcoe March 18, 2025 20:24
@ryan953 ryan953 requested a review from a team March 18, 2025 20:31
Copy link

codecov bot commented Mar 18, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
9955 1 9954 4
View the top 1 failed test(s) by shortest run time
Performance > TransactionSummary renders additional Web Vital column
Stack Traces | 0.281s run time
Error: expect(element).toHaveTextContent()

Expected element to have text content:
  deadbeef
Received:

    at Object.<anonymous> (.../views/performance/transactionEvents.spec.tsx:276:37)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@@ -1,27 +1,21 @@
import ExternalLink from 'sentry/components/links/externalLink';
import {t, tct} from 'sentry/locale';
import {InsightsLineChartWidget} from 'sentry/views/insights/common/components/insightsLineChartWidget';
import {FRONTEND_LANDING_SUB_PATH} from 'sentry/views/insights/pages/frontend/settings';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still used in other places?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. a few spots


const aliases = {
healthy_session_count: t('Healthy session count'),
crashed_session_count: frontendPath
? t('Unhandled error session count')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think @jas-kas wanted to keep this distinction b/t frontend + mobile wording intentional

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know :( that was a thing that came up a bunch. These series names are matching what's in Dashboards now:

SCR-20250318-morj

maybe i can adjust the chart titles per view to bring the distinction back

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okk np, i like that it matches. just ccing @jas-kas so she's aware!

@ryan953 ryan953 merged commit f730536 into master Mar 18, 2025
40 checks passed
@ryan953 ryan953 deleted the ryan953/insights-session-health-hide-healthy branch March 18, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants