getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.29k stars 4.21k forks source link

[Discover & Dashboards] Saving Searches and Widgets fails when using a measurement.* in an equation #80625

Closed souredoutlook closed 2 days ago

souredoutlook commented 2 weeks ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Load page: https://francisorg.sentry.io/discover/homepage/?dataset=transactions&field=title&field=timestamp&field=transaction.duration&field=measurements.memoryused&field=equation%7Ctransaction.duration%20%2F%20measurements.memoryused&name=All%20Errors&project=4504039154974720&query=transaction%3A%22GET%20%2FTransaction%22&queryDataset=transaction-like&sort=-timestamp&statsPeriod=14d&yAxis=count%28%29
  2. Click "Save as..." and enter a random name adf
  3. See that the toast says "query not saved"
  4. Inspect the network response to see status 400 "Cannot save invalid query: not allowed in arithmetic"
  5. Removing the query param allows the search to be saved without incident.

Expected Result

The query will save.

Actual Result

The query cannot be saved.

Likewise, adding a similar equation to a dashboard widget will cause the widget to disappear on page refresh: https://sentry.zendesk.com/agent/tickets/137673

Product Area

Dashboards

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 2 weeks ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 2 weeks ago

Routing to @getsentry/product-owners-discover for triage ⏲️

narsaynorath commented 2 weeks ago

@souredoutlook thanks for the heads up. I was able to recreate this and I think I have an idea of the fix, I'll let you know here when I have a PR up!

narsaynorath commented 1 day ago

Heads up, this is merged and deployed now so it should be possible to save that query! Let me know if there are other issues related to this