Skip to content

Support Application Metrics widget_type in Dashboard REST API #116258

@sentry-junior

Description

@sentry-junior

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.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions