feat(discover): Allow ttid/ttfd contribution rate in arithmetic equations#109521
Merged
feat(discover): Allow ttid/ttfd contribution rate in arithmetic equations#109521
Conversation
…ions Add `ttid_contribution_rate` and `ttfd_contribution_rate` to the allowed arithmetic functions in discover equations. The Mobile Vitals dashboard uses these functions in widget equations, and without them being in the allowed list, equation validation would fail. Refs DAIN-1243 Co-Authored-By: Claude <noreply@anthropic.com>
DominikB2014
approved these changes
Feb 27, 2026
gggritso
added a commit
that referenced
this pull request
Feb 27, 2026
…in Mobile Vitals (#109525) The Span Operations table in the Mobile Vitals dashboard uses `ttid_contribution_rate()` and `ttfd_contribution_rate()` as aggregates. When clicking "Open in Explore", these were silently dropped because `getWidgetExploreUrl` filters aggregates to only those present in `eventView.getYAxisOptions()` — which only recognizes functions known natively to Explore. Prefixing with `equation|` fixes this: equations pass the `isAggregateEquation()` check in `getYAxisOptions()`, so they're included in the yAxis options and flow through to Explore correctly. The functions are defined in EAP (`src/sentry/search/eap/spans/formulas.py`), so Explore can resolve them. The backend companion PR (#109521) adds these functions to the arithmetic allowed list so they pass equation validation. Follows the same pattern as #108045 (Frontend Overview dashboard). **Note:** This PR depends on #109521 landing first. Fixes DAIN-1243 Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
ttid_contribution_rateandttfd_contribution_rateto the allowed arithmetic functions list inArithmeticVisitor. This is needed so the Mobile Vitals dashboard can use these functions with theequation|prefix in widget aggregates.Without this, any equation containing these functions would fail backend validation, causing the Span Operations table widget to break when the
equation|prefix is applied (see companion frontend PR).Follows the same pattern as #107958 (which added
tpm, conditional_iffunctions for the Frontend Overview dashboard).Refs DAIN-1243