Skip to content

Change to `all` for stricter check

2156b77
Select commit
Loading
Failed to load commit list.
Merged

feat(tracemetrics): Bypass metric field validation for equations #112479

Change to `all` for stricter check
2156b77
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Apr 8, 2026 in 1m 6s

1 issue

Medium

all() on empty sequence bypasses metric field validation - `src/sentry/explore/endpoints/serializers.py:228-232`

Python's all() returns True for empty iterables. When aggregateField is missing, empty, or contains items with empty/missing yAxes, the generator produces zero elements and has_equations evaluates to True. This allows queries without equations (and without aggregate fields) to bypass the metric field validation on the metrics dataset, contrary to the intended behavior of only bypassing validation when all y-axes are equations.

2 skills analyzed
Skill Findings Duration Cost
sentry-security 0 54.5s $0.32
sentry-backend-bugs 1 59.8s $0.24

Duration: 1m 54s · Tokens: 264.2k in / 4.9k out · Cost: $0.57 (+extraction: $0.00, +fix_gate: $0.00, +dedup: $0.00)