diff --git a/pkg/logql/metrics.go b/pkg/logql/metrics.go index 63b3ec0ecfb22..79946bf7838fa 100644 --- a/pkg/logql/metrics.go +++ b/pkg/logql/metrics.go @@ -87,8 +87,8 @@ func RecordMetrics(ctx context.Context, p Params, status string, stats stats.Res "step", p.Step(), "duration", time.Duration(int64(stats.Summary.ExecTime*float64(time.Second))), "status", status, - "throughput_mb", float64(stats.Summary.BytesProcessedPerSecond)/10e6, - "total_bytes_mb", float64(stats.Summary.TotalBytesProcessed)/10e6, + "throughput_mb", float64(stats.Summary.BytesProcessedPerSecond)/1e6, + "total_bytes_mb", float64(stats.Summary.TotalBytesProcessed)/1e6, ) bytesPerSecond.WithLabelValues(status, queryType, rt, latencyType). diff --git a/pkg/logql/metrics_test.go b/pkg/logql/metrics_test.go index 076cc10c55746..e0d2064f85d53 100644 --- a/pkg/logql/metrics_test.go +++ b/pkg/logql/metrics_test.go @@ -72,7 +72,7 @@ func TestLogSlowQuery(t *testing.T) { }) require.Equal(t, fmt.Sprintf( - "level=info org_id=foo traceID=%s latency=slow query=\"{foo=\\\"bar\\\"} |= \\\"buzz\\\"\" query_type=filter range_type=range length=1h0m0s step=1m0s duration=25.25s status=200 throughput_mb=0.01 total_bytes_mb=0.01\n", + "level=info org_id=foo traceID=%s latency=slow query=\"{foo=\\\"bar\\\"} |= \\\"buzz\\\"\" query_type=filter range_type=range length=1h0m0s step=1m0s duration=25.25s status=200 throughput_mb=0.1 total_bytes_mb=0.1\n", sp.Context().(jaeger.SpanContext).SpanID().String(), ), buf.String())