Skip to content

feat(discover): Add conditional functions and tpm to allowed arithmetic functions#107958

Merged
DominikB2014 merged 3 commits intomasterfrom
dominikbuszowiecki/browse-310-add-tpmavg_ifetc-as-allowed-functions-for-equations
Feb 10, 2026
Merged

feat(discover): Add conditional functions and tpm to allowed arithmetic functions#107958
DominikB2014 merged 3 commits intomasterfrom
dominikbuszowiecki/browse-310-add-tpmavg_ifetc-as-allowed-functions-for-equations

Conversation

@DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Feb 10, 2026

Summary

Adds support for conditional aggregate functions and transactions per minute (tpm) to the arithmetic operations allowed in Discover queries and dashboard equations. Following the pattern #107941

Changes

  • Added tpm function for transactions per minute calculations
  • Added conditional aggregate functions with _if suffix:
    • Percentiles: p50_if, p75_if, p90_if, p95_if, p99_if
    • Aggregates: sum_if, avg_if, count_if
    • Custom: division_if, failure_rate_if

Context

The frontend overview dashboard uses these functions in its widget equations. Without these being added to the allowed functions list, equations using these functions would fail validation.

@DominikB2014 DominikB2014 requested a review from a team as a code owner February 10, 2026 18:53
@linear
Copy link

linear bot commented Feb 10, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 10, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link
Contributor

@edwardgou-sentry edwardgou-sentry left a comment

Choose a reason for hiding this comment

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

count_if is already on the list

@DominikB2014 DominikB2014 enabled auto-merge (squash) February 10, 2026 19:00
@DominikB2014 DominikB2014 merged commit 9bf1e0e into master Feb 10, 2026
75 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/browse-310-add-tpmavg_ifetc-as-allowed-functions-for-equations branch February 10, 2026 19:22
jaydgoss pushed a commit that referenced this pull request Feb 12, 2026
…ic functions (#107958)

## Summary

Adds support for conditional aggregate functions and transactions per
minute (tpm) to the arithmetic operations allowed in Discover queries
and dashboard equations. Following the pattern
#107941

## Changes

- Added `tpm` function for transactions per minute calculations
- Added conditional aggregate functions with `_if` suffix:
  - Percentiles: `p50_if`, `p75_if`, `p90_if`, `p95_if`, `p99_if`
  - Aggregates: `sum_if`, `avg_if`, `count_if`
  - Custom: `division_if`, `failure_rate_if`

## Context

The frontend overview dashboard uses these functions in its widget
equations. Without these being added to the allowed functions list,
equations using these functions would fail validation.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants