From a71381ad2a536bde5ba4d60eb4112b58f69115eb Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 12 Jun 2019 16:56:06 +0300 Subject: [PATCH] app/vmselect/promql: list a sample of duplicate time series in the error message for `group_left` or `group_right` This should improve troubleshooting for complex queries involving `group_left` and `group_right` modifiers. --- app/vmselect/promql/binary_op.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/vmselect/promql/binary_op.go b/app/vmselect/promql/binary_op.go index d5e15e0b8..11bc1d76e 100644 --- a/app/vmselect/promql/binary_op.go +++ b/app/vmselect/promql/binary_op.go @@ -296,7 +296,8 @@ func adjustBinaryOpTags(be *binaryOpExpr, left, right []*timeseries) ([]*timeser if len(tss) == 1 { return nil } - return fmt.Errorf(`duplicate timeseries on the %s side of %q: %s %s`, side, be.Op, stringMetricTags(&tss[0].MetricName), be.GroupModifier.AppendString(nil)) + return fmt.Errorf(`duplicate timeseries on the %s side of %s %s: %s and %s`, side, be.GroupModifier.AppendString(nil), be.Op, + stringMetricTags(&tss[0].MetricName), stringMetricTags(&tss[1].MetricName)) } var rvsLeft, rvsRight []*timeseries mLeft, mRight := createTimeseriesMapByTagSet(be, left, right)