Skip to content

Commit 0626362

Browse files
committed
better error msg for time spine failure (#8685)
1 parent d494641 commit 0626362

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runtime/metricsview/ast.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,10 +1098,10 @@ func (a *AST) buildSpineSelect(alias string, spine *Spine, tr *TimeRange) (*Sele
10981098
}
10991099

11001100
if spine.TimeRange != nil {
1101-
// if spine generates more than 1000 values then return an error
1101+
// if spine generates more than 1500 values then return an error
11021102
bins := timeutil.ApproximateBins(spine.TimeRange.Start, spine.TimeRange.End, spine.TimeRange.Grain.ToTimeutil())
11031103
if bins > 1500 {
1104-
return nil, errors.New("failed to apply time spine: time range has more than 1500 bins")
1104+
return nil, fmt.Errorf("failed to apply time spine: time range has more than 1500 bins for %q grain, move to a larger grain", spine.TimeRange.Grain)
11051105
}
11061106

11071107
timeDim := a.MetricsView.TimeDimension

0 commit comments

Comments
 (0)