Support Application Metrics widget_type in Dashboard REST API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 23m
- Merged PRs (30d)
- 607
Description
The Dashboard REST API (POST /api/0/organizations/{slug}/dashboards/) does not support Application Metrics as a widget_type, making it impossible to create metrics-based dashboard widgets programmatically — even though this is fully supported in the Sentry UI.
Current behavior
The widget_type field in the Dashboard REST API accepts error-events and transaction-like, but not a metrics (custom-metrics or equivalent) type. Attempts to create a metrics widget via API or Terraform (sentry_dashboard resource) fail or silently fall back to unsupported types.
Gap
Teams managing Sentry configuration as code (Terraform, CI pipelines, scripts) cannot replicate metrics-based dashboard widgets that they can build manually in the UI. This blocks IaC workflows for any org relying on Application Metrics for observability dashboards.
Desired capability
Expose Application Metrics as a supported widget_type in the Dashboard REST API, with the same query shape (MRI-based fields, aggregate functions, group-by) available in the UI widget builder.
Action taken on behalf of Richard Propst.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Dashboard REST API POST /api/0/organizations/{slug}/dashboards/ endpoint and trace validation of the widget_type field, then compare it with the Application Metrics widget builder in the Sentry UI. Done means the API accepts the metrics widget type and supports the UI's MRI-based fields, aggregate functions, and group-by query shape, including through the sentry_dashboard Terraform resource.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, terraform
- Domain
- api, backend, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100