getsentry / getsentry/sentry

Support Application Metrics widget_type in Dashboard REST API

Open
#116,258 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Component: API Improvement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.