Skip to content

fix(tracemetrics): Pass project and env in alerts#113551

Merged
narsaynorath merged 1 commit into
masterfrom
nar/fix/tracemetrics-equations-in-alerts-pass-project-and-env
Apr 21, 2026
Merged

fix(tracemetrics): Pass project and env in alerts#113551
narsaynorath merged 1 commit into
masterfrom
nar/fix/tracemetrics-equations-in-alerts-pass-project-and-env

Conversation

@narsaynorath

Copy link
Copy Markdown
Member

No description provided.

@narsaynorath
narsaynorath requested review from a team as code owners April 21, 2026 15:54
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 21, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8535fd0. Configure here.

return [Number(projectId)];
}
return [];
}, [projectId]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Empty array prevents fallback to page filter projects

Medium Severity

When projectId is falsy, projectIds is set to [] instead of undefined. In useMetricOptions, the nullish coalescing operator (projectIds ?? selection.projects) won't fall back to page filter projects for an empty array, unlike environments which correctly returns undefined to trigger the fallback. This means metric options will be fetched without any project filter when the form's project field is empty, showing metrics from all projects instead of respecting page filters.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8535fd0. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ack, will need to fix later, just trying to get this mostly working for bug bash

@narsaynorath
narsaynorath merged commit ed96507 into master Apr 21, 2026
76 of 78 checks passed
@narsaynorath
narsaynorath deleted the nar/fix/tracemetrics-equations-in-alerts-pass-project-and-env branch April 21, 2026 16:07
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants