feat(spans): Remove references to old -if syntax - #120686
Conversation
wmak
commented
Jul 27, 2026
- This removes the old if syntax from the prebuilt dashboards
- Depends on feat(spans): Add new conditional if syntax #120684
- https://linear.app/getsentry/issue/BROWSE-559/migrate-any-existing-multi-parameter-style-if-combinators-to-the
- This removes the old if syntax from the prebuilt dashboards
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit 459a17f. Configure here.
| columns: [], | ||
| conditions: SPAN_OP_FILTER, | ||
| orderby: `equation|avg_if(${SpanFields.SPAN_DURATION},${SpanFields.SPAN_OP},equals,queue.process)`, | ||
| orderby: `equation|avg_if(\`${SpanFields.SPAN_OP}:queue.process,\`${SpanFields.SPAN_DURATION},)`, |
There was a problem hiding this comment.
Malformed avg_if equation syntax
High Severity
The new avg_if expressions place backticks and commas incorrectly, producing a filter like `span.op:queue.process,`span.duration, instead of `span.op:queue.process`,span.duration. The same broken form appears in the Average Processing Time widget and Consumer Transactions table, while queues.ts and laravelOverview.ts use the correct syntax. Those queue detail widgets will fail to query.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 459a17f. Configure here.
There was a problem hiding this comment.
Looks valid, the backtick is after the coma
| name: '', | ||
| fields: [ | ||
| `equation|avg_if(${SpanFields.SPAN_DURATION},${SpanFields.SPAN_OP},equals,queue.process)`, | ||
| `equation|avg_if(\`${SpanFields.SPAN_OP}:queue.process,\`${SpanFields.SPAN_DURATION},)`, |
There was a problem hiding this comment.
Bug: The avg_if function calls in queueDetails.ts have a misplaced backtick and an extra trailing comma, creating a malformed query string for the dashboard widgets.
Severity: HIGH
Suggested Fix
Correct the avg_if function calls in queueDetails.ts. Move the closing backtick to be before the comma separating the arguments, and remove the trailing comma after the SpanFields.SPAN_DURATION variable. The correct format should be `equation|avg_if(\`${SpanFields.SPAN_OP}:queue.process\`,${SpanFields.SPAN_DURATION})`. Apply this fix to all identified occurrences.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/views/dashboards/utils/prebuiltConfigs/queues/queueDetails.ts#L43
Potential issue: In `queueDetails.ts`, several `avg_if` function calls are constructed
with incorrect syntax. Specifically, the backtick closing the filter condition is placed
after the comma, and an extra trailing comma is added after the duration field. This
results in a malformed query string like ``
`equation|avg_if(\`span.op:queue.process,\`span.duration,)` `` instead of the correct ``
`equation|avg_if(\`span.op:queue.process\`,span.duration)` ``. This malformed query will
be sent to the backend, likely causing the "Average Processing Time" and "Consumer
Transactions" dashboard widgets to either fail with an error or display incorrect data.
Also affects:
static/app/views/dashboards/utils/prebuiltConfigs/queues/queueDetails.ts:180~180static/app/views/dashboards/utils/prebuiltConfigs/queues/queueDetails.ts:187~187
Did we get this right? 👍 / 👎 to inform future reviews.
DominikB2014
left a comment
There was a problem hiding this comment.
Asides from the small cursor comment, lgtm!
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you add the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |

