Skip to content

Dashboards Support min/max/clamp functions in dashboard custom equations #120813

Description

@Angelodaniel

Problem Statement

Custom equations in dashboard widgets currently only support basic arithmetic operators. This is restrictive when building derived metrics, for example, clamping a calculated percentage to a 0–100 range, or taking the min/max of two series to build a combined health indicator.

Feedback from a customer migrating a Grafana dashboard to Sentry (application metrics + dashboards):

"The custom equations can be a bit restrictive, would be great if we could also use min/max/clamp and the likes"

Grafana and other tools support these as standard equation functions, and their absence is one of the more noticeable gaps when migrating existing dashboards over.

Solution Brainstorm

Add min(), max(), and clamp() (or equivalent bounding function) as allowed functions in the dashboard equation editor, alongside the existing arithmetic operators. This would let users combine two or more series/metrics and constrain output ranges without needing a workaround.

Product Area

Dashboards

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions