grafana/k6 · error
metrics push concurrency must be a positive number but is %d
Error message
metrics push concurrency must be a positive number but is %d
What it means
The cloud output was configured with K6_CLOUD_METRIC_PUSH_CONCURRENCY (or options.cloud metricPushConcurrency) below 1. newOutput validates that the number of concurrent metric-pushing goroutines is at least 1 and rejects zero/negative values.
Source
Thrown at internal/output/cloud/output.go:182
scriptPath := params.ScriptPath.String()
if scriptPath == "" {
// Script from stdin without a name, likely from stdin
return nil, errors.New("script name not set, please specify K6_CLOUD_NAME or options.cloud.name")
}
conf.Name = null.StringFrom(filepath.Base(scriptPath))
}
if conf.Name.String == "-" {
conf.Name = null.StringFrom(defaultTestName)
}
duration, testEnds := lib.GetEndOffset(params.ExecutionPlan)
if !testEnds {
return nil, errors.New("tests with unspecified duration are not allowed when outputting data to k6 cloud")
}
if conf.MetricPushConcurrency.Int64 < 1 {
return nil, fmt.Errorf("metrics push concurrency must be a positive number but is %d",
conf.MetricPushConcurrency.Int64)
}
if conf.MaxTimeSeriesInBatch.Int64 < 1 {
return nil, fmt.Errorf("max allowed number of time series in a single batch must be a positive number but is %d",
conf.MaxTimeSeriesInBatch.Int64)
}
apiClient := cloudapi.NewClient(
logger, conf.Token.String, conf.Host.String, build.Version, conf.Timeout.TimeDuration())
return &Output{
config: conf,
client: apiClient,
executionPlan: params.ExecutionPlan,
duration: int64(duration / time.Second),
logger: logger,
usage: params.Usage,View on GitHub (pinned to 01ffac6f24)
Solutions
- Set metricPushConcurrency to a positive integer, e.g. K6_CLOUD_METRIC_PUSH_CONCURRENCY=5
- Omit the setting to use the default concurrency
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/output/cloud/output.go:182 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/06e2961287a6833a.
Report an issue: GitHub.