You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve data-sentry-label granularity and add inp.category grouping for Sentry INP #105513
Fix Sentry not using data-sentry-label restored data-sentry-label on Sentry INP spans. This issue makes those labels more useful by giving them finer detail and grouping them into categories, so the INP dashboard can show aggregated INP per interaction group.
Add inp.category to Sentry INP spans. Add a beforeSendSpan middleware in src/libs/telemetry/middlewares/ and wire it into Sentry.init(). For spans whose op starts with ui.interaction.:
Read the label from the description with /\[data-sentry-label="([^"]+)"\]/. Don't split the raw description, because it's a CSS selector.
If the label follows <Area>-<Action>-<Detail>, set span.data['inp.category'] to <Area>-<Action>. Use span.data, not span.attributes.
Cover the logic with unit tests.
Add a table widget to the Sentry INP dashboard. Filter by has:inp.category and group by inp.category to show aggregated INP per group.
Update existing labels from the FullStory list. For example, split Search-ActionCellAction into Search-ActionCellAction-Submit, -Approve, -Pay and so on. Existing 3-part labels such as SelectionList-ListHeader-SelectAll will become categories automatically; rename them or accept that. List the renamed labels in the PR, since they lose their history.
Add the missing labels from the FullStory list.
Document data-sentry-label in contributingGuides/INP_IMPROVEMENT_WORKFLOW.md, or a doc linked from it. Cover the naming schema, how inp.category is derived, and the rule that labels contain no IDs or user data.
Cover Button, MenuItem and other components that wrap pressables and pass sentryLabel to them. Add the missing labels, and extend the existing no-restricted-syntax rule in config/eslint/eslint.config.mjs so it also requires sentryLabel on these components. It currently only checks direct Pressable* usages.
@GCyganek I think this wont need a C+, can you make sure to test thoroughly and then if C+ is autoassigned, ask them not to review, unless you think something will require good thorough review and testing
@MelvinBot please verify these findings related to Sentry labels that are built from runtime values, labels hardcoded outside CONST.SENTRY_LABEL, labels that don't follow the data-sentry-label schema:
1. User data in labels (highest priority)
src/components/Switch.tsx: sentryLabel={enhancedAccessibilityLabel} reuses the translated accessibility label, and several callers put user data in it:
tag, category and vendor names: WorkspaceTagsTableRow.tsx, WorkspaceCategoriesTableRow.tsx, WorkspaceVendorsTable/index.tsx
report field list values: WorkspaceReportFieldListValuesTableRow.tsx
On web this reaches Sentry and FullStory as data-sentry-label, and each locale becomes its own series. Fix: make sentryLabel a required Switch prop and pass a CONST.SENTRY_LABEL value at every call site (about 45).
2. Labels built at runtime
src/pages/signin/Socials.tsx: `${CONST.SENTRY_LABEL.SOCIALS.LINK}-${social.iconURL}`. The values are safe (a fixed icon union) but aren't in CONST. Add one CONST entry per social link and drop the Socials- allowlist prefix.
src/pages/signin/SignInPageLayout/FooterRow/index.native.tsx: sentryLabel={translationPath} produces dotted translation keys, which native drops. The web FooterRow/index.tsx has no label at all.
src/pages/workspace/merge/MergeSyncResultsPageBase.tsx: `${testID}-SkippedEmployees` builds the label from the testID. Use two CONST entries (HR and Recruiting).
src/components/TextInput/BaseTextInput/implementation/index.tsx: `${sentryLabel}-ClearButton` adds a new part, which changes the inp.category. SENTRY_LABEL.md says to use ${sentryLabel}ClearButton. The -ClearButton suffix in the native allowlist has the same mistake. Renaming will lose Sentry history.
Search filters build labels from filter keys:
`Search-Filter-${filterKey}` in useSearchFiltersBar.tsx
`Search-Advanced-Filter-${filterKey}` in FilterList.tsx. This has 4 parts, so it gets no inp.category.
`Search-FilterPopupApply-${baseFilterKey}` in ListPopup.tsx, TextFilterPopup.tsx and MerchantFilterPopup.tsx
Risk:SearchAdvancedFiltersKey includes reportField-<fieldName>, and field names are defined by each policy, so they can be user data. The filter bar currently groups report fields under report-field, so nothing leaks today. But the native allowlist accepts anything after these prefixes, so nothing would catch a future leak. Consider a CONST map keyed by filter key.
3. Hardcoded strings not in CONST.SENTRY_LABEL (dropped on native)
Switch, beta names:DynamicBetaOverridesPage uses CONST.BETAS values, so it leaks no user data. It still breaks the schema.
Switch, missed leak:ToggleSettingsOptionRow.tsx:227-231 passes accounting field names (Campfire, Rillet, DualEntry, Zoho, Business Central) and subtitles into the Switch label. There are 44 direct <Switch sites, plus switchProps objects passed to ButtonWithDropdownMenu.
Search filters: the report-field group key is reportField, not report-field. Nothing leaks today.
ClearButton: native passes no label to its clear button, so the native -ClearButton suffix matches nothing.
Missed items:ConciergePromptBox-AddAttachment and ConciergePromptBox-Send, Workspace-CompanyCards-TableItem, and 5 more unused WORKSPACE.RULES keys.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.34-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
GCyganek commentedon Oct 30, 2026
@MelvinBot please assign me to this issue as I will start working on it soon
MelvinBot commentedon Oct 30, 2026
Done. I assigned you (
GCyganek) to this issue.view run
GCyganek commentedon Oct 30, 2026
Currently required changes for FullStory:
mountiny commentedon Oct 30, 2026
@GCyganek thanks! Could we also add something to the AGENTS.md so the ai would already create the labels for new components in correct way?
inp.categoryto Sentry INP spans #105518inp.categorytable widget to the Sentry INP dashboard #105519data-sentry-labelvalues from the FullStory list #105521data-sentry-labelschema in the INP guide and AGENTS.md #105522sentryLabelonButton,MenuItemand other pressable wrappers #105523mountiny commentedon Nov 2, 2026
@GCyganek I think this wont need a C+, can you make sure to test thoroughly and then if C+ is autoassigned, ask them not to review, unless you think something will require good thorough review and testing
GCyganek commentedon Nov 2, 2026
@mountiny will do, thanks for creating sub-issues!
GCyganek commentedon Nov 3, 2026
@MelvinBot please verify these findings related to Sentry labels that are built from runtime values, labels hardcoded outside
CONST.SENTRY_LABEL, labels that don't follow thedata-sentry-labelschema:1. User data in labels (highest priority)
src/components/Switch.tsx:sentryLabel={enhancedAccessibilityLabel}reuses the translated accessibility label, and several callers put user data in it:WorkspaceTagsTableRow.tsx,WorkspaceCategoriesTableRow.tsx,WorkspaceVendorsTable/index.tsxWorkspaceReportFieldListValuesTableRow.tsxWorkspaceDistanceRatesTableRow.tsxDynamicBetaOverridesPage.tsxOn web this reaches Sentry and FullStory as
data-sentry-label, and each locale becomes its own series.Fix: make
sentryLabela required Switch prop and pass aCONST.SENTRY_LABELvalue at every call site (about 45).2. Labels built at runtime
src/pages/signin/Socials.tsx:`${CONST.SENTRY_LABEL.SOCIALS.LINK}-${social.iconURL}`. The values are safe (a fixed icon union) but aren't in CONST. Add one CONST entry per social link and drop theSocials-allowlist prefix.src/pages/signin/SignInPageLayout/FooterRow/index.native.tsx:sentryLabel={translationPath}produces dotted translation keys, which native drops. The webFooterRow/index.tsxhas no label at all.src/pages/workspace/merge/MergeSyncResultsPageBase.tsx:`${testID}-SkippedEmployees`builds the label from the testID. Use two CONST entries (HR and Recruiting).src/components/TextInput/BaseTextInput/implementation/index.tsx:`${sentryLabel}-ClearButton`adds a new part, which changes theinp.category.SENTRY_LABEL.mdsays to use${sentryLabel}ClearButton. The-ClearButtonsuffix in the native allowlist has the same mistake. Renaming will lose Sentry history.Search filters build labels from filter keys:
`Search-Filter-${filterKey}`inuseSearchFiltersBar.tsx`Search-Advanced-Filter-${filterKey}`inFilterList.tsx. This has 4 parts, so it gets noinp.category.`Search-FilterPopupApply-${baseFilterKey}`inListPopup.tsx,TextFilterPopup.tsxandMerchantFilterPopup.tsxRisk:
SearchAdvancedFiltersKeyincludesreportField-<fieldName>, and field names are defined by each policy, so they can be user data. The filter bar currently groups report fields underreport-field, so nothing leaks today. But the native allowlist accepts anything after these prefixes, so nothing would catch a future leak. Consider a CONST map keyed by filter key.3. Hardcoded strings not in
CONST.SENTRY_LABEL(dropped on native)TestToolsModalNavigator-Dismiss(TestToolsModalNavigator.tsx)Banner-Close(Banner.tsx)RadioButtonWithLabel(RadioButtonWithLabel.tsx)TestToolsModalPage-ReleaseOptions(TestToolsModalPage.tsx)FeedSelector(FeedSelector.tsx)OnboardingHeader-Back(OnboardingHeader.tsx)GrowlNotification-Dismiss,GrowlNotification-Action(GrowlNotificationContent.tsx)CenteredModalLayout-backdrop(CenteredModalLayoutOverlay/index.native.tsx): lowercaseSearchStaticList-item,SearchStaticList-wide-item(SearchStaticList.tsx): lowercaseSearchAdvancedFiltersPopup-DescribeSearch(SearchAdvancedFiltersPopup/index.tsx)DateSelectPopup-Back(SelectedDateModifierHeader.tsx)MapView-ToggleDistanceUnit(DistanceSymbolMarker.web.tsx)DistanceRequestFooter-AddStop,DistanceRequestFooter-ReuseRoute(DistanceRequestFooter.tsx)PopoverMenu.DismissButton(PopoverMenu/v2/content/DismissButton.tsx): uses a dotInsightsChartMenu(InsightsChartWidget.tsx)TwoFactorAuthSecret-Copy(TwoFactorAuthSecretDisplay.tsx)EditAgentAvatar-BotAvatarSelector(DynamicEditAgentAvatarPage.tsx)HomeSectionExpandToggle(HomeSectionExpandToggle.tsx)InsightsOverflowMenu(InsightsSectionContent.tsx)InsightTitleDropdown(InsightTitleDropdown.tsx)RecentlyAddedRow(RecentlyAddedRow.tsx)RecentlyAddedOverflowMenu(RecentlyAddedSection/index.tsx)ConciergeThinkingMessage-ToggleReasoning(ConciergeThinkingMessage.tsx)ImportFromFileStep-TemplateLink,ImportFromFileStep-HelpGuideLink(ImportFromFileStep.tsx)SearchAdvancedFiltersBase-DescribeSearch(SearchAdvancedFiltersBase.tsx)Labels with only one part (
FeedSelector,InsightsChartMenu,RecentlyAddedRow, ...) also break the<Area>-<Action>schema.4. CONST values that break the schema
MAP_VIEW.COMPASS: 'compass': lowercase, one partSOCIALS.LINK: 'Socials': one partUNREPORTED_EXPENSE_LIST_ITEM: 'UnreportedExpenseListItem': one partMONEY_REQUEST_REPORT_TRANSACTION_ITEM: 'MoneyRequestReportTransactionItem': one part5. Unused CONST labels (the elements may have lost their labels in a refactor)
WORKSPACE.INITIAL.ACCOUNTING,HR,RECRUITING,RECEIPT_PARTNERS,MCP. The workspace "Accounting" item now usesCONNECTIONS.WORKSPACE.ACCOUNTING.SETUP_BUTTON,WORKSPACE.ACCOUNTING.THREE_DOT_MENUWORKSPACE_EXPENSIFY_CARD.CARD_LIST_ROWWORKSPACE.RULES.REQUIRE_FIELDS_RULE_FIELD_TOGGLE. This is the intended label for the switch inFieldRequirementSettingRow.tsx.Create a sub-issue to fix these labels
MelvinBot commentedon Nov 3, 2026
I created [INP] Fix data-sentry-label values that use runtime data or break the label schema as a sub-issue and assigned it to you. Most findings are correct. The new issue includes these corrections and additions:
DynamicBetaOverridesPageusesCONST.BETASvalues, so it leaks no user data. It still breaks the schema.ToggleSettingsOptionRow.tsx:227-231passes accounting field names (Campfire, Rillet, DualEntry, Zoho, Business Central) and subtitles into the Switch label. There are 44 direct<Switchsites, plusswitchPropsobjects passed toButtonWithDropdownMenu.reportField, notreport-field. Nothing leaks today.-ClearButtonsuffix matches nothing.ConciergePromptBox-AddAttachmentandConciergePromptBox-Send,Workspace-CompanyCards-TableItem, and 5 more unusedWORKSPACE.RULESkeys.view run
melvin-bot commentedon Nov 9, 2026
@mountiny @GCyganek
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.34-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
mountiny commentedon Nov 10, 2026
We are chugging through the PRs.