Skip to content

Invalid metric error when creating metric alert #77931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rodolfoBee opened this issue Sep 23, 2024 · 9 comments
Open

Invalid metric error when creating metric alert #77931

rodolfoBee opened this issue Sep 23, 2024 · 9 comments

Comments

@rodolfoBee
Copy link
Member

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Go to alerts
  2. Create a new alert with Custom measurement
  3. Under "Define your metric" select " Custom measurement - p95 - spans.ui - 4h internval"
  4. Set any threshold, actions and alert name
  5. Try to save the alert

Expected Result

The alert is created.

Actual Result

Internal error: Invalid Metric: We do not currently support this field.
Most likely from this line: https://github.com/getsentry/sentry/blob/master/src/sentry/incidents/serializers/alert_rule.py#L158-L175

Product Area

Alerts

Link

No response

DSN

No response

Version

No response

@getsantry
Copy link
Contributor

getsantry bot commented Sep 23, 2024

Auto-routing to @getsentry/product-owners-alerts for triage ⏲️

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Sep 23, 2024
@rachrwang
Copy link

@wedamija - do you know what might be the cause of this problem?

@ceorourke ceorourke changed the title Invalid metric error when creating matric alert Invalid metric error when creating metric alert Dec 12, 2024
@linear linear bot added the Migrated label Jan 9, 2025
@dalnoki
Copy link
Contributor

dalnoki commented Feb 18, 2025

I have a customer who reported the same, but they used p95, spans.ui and 4 hour interval:

Image

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Feb 18, 2025
@ceorourke
Copy link
Member

@iambriccardo do you have insight into this? It looks like you've done some work around this - it's checking the organizations:custom-metrics flag which is set to false by default and I don't see it in options automator or getsentry, so it might not work for any customers.

@minori-fh
Copy link

I have a customer who reported the same but they used spans (beta), sum, a custom measurement, and 30 minute interval

Image

@gaprl gaprl removed the Migrated label Mar 5, 2025
@krzysztofjablonski
Copy link

Hey @minori-fh, do you have any updates on the bug?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Mar 23, 2025
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Mar 25, 2025
@rodolfoBee
Copy link
Member Author

There is another report for this issue.

In this case, the user wants to use a custom measurement created with setMeasurement but it is not available in the list. The same measurement is used in Dashboards with no issues.

@mifu67 @ceorourke do you have any update on the issue?

@mifu67
Copy link
Contributor

mifu67 commented Mar 25, 2025

Hey @rodolfoBee,

Our team doesn't currently have the bandwidth to investigate this, but I've added it to our backlog.

@masinette
Copy link
Member

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Development

No branches or pull requests

9 participants