grafana/k6 · error
the cloud output needs the following system tags enabled
Error message
the cloud output needs the following system tags enabled: %s
What it means
Thrown while wiring up the cloud output (k6 cloud, k6 cloud run, or --out cloud): the cloud service requires the system tags name(proto), method, status, error, check and group on every sample, and the run was configured with a restricted systemTags set that omits at least one of them. The error lists exactly which required tags are missing. k6 aborts startup because cloud aggregation would otherwise be incomplete.
Solutions
- Re-enable the tags named in the error: --system-tags 'check,error,group,method,name,proto,status' (plus any others you want)
- Remove the --system-tags flag / systemTags option entirely so k6 uses its default set, which already includes all required tags
- If the restriction comes from the script, edit `export const options = { systemTags: [...] }` to include the required tags
- If cloud results are not needed, drop --out cloud and run locally instead
Example fix
// before k6 run --out cloud --system-tags 'proto,status' script.js // after k6 run --out cloud --system-tags 'check,error,group,method,name,proto,status' script.js // or simply omit --system-tags (defaults include all required tags)
Defensive patterns
Strategy: validation
Validate before calling
# before invoking k6 with a cloud output, verify the system-tags flag is a superset of the required tags
req="check error group method name proto status"
for t in $req; do
case " $K6_SYSTEM_TAGS $EXTRA_SYSTEM_TAGS " in
*" $t "*) ;;
*) echo "missing required system tag: $t"; exit 1;;
esac
done
k6 run --out cloud script.js Prevention
- Never restrict systemTags in scripts you plan to send to the cloud; keep one options block for local-only runs and one for cloud runs
- Default to omitting systemTags — the k6 default set already satisfies the cloud output
- Add a CI lint that greps exported options for systemTags when the job uses --out cloud
When it happens
Trigger: Running with a cloud output while --system-tags, K6_SYSTEM_TAGS, or options.systemTags in the script does not include all of: proto/name, method, status, error, check, group. Example: `k6 run --out cloud --system-tags 'proto,status' script.js` fails listing error, check, group (and name/method if omitted).
Common situations: Copy-pasted options blocks that slim systemTags to cut storage costs; shared CI configs tuned for local JSON output then reused with --out cloud; scripts written before the cloud output enforced required tags.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- 99
- can't have two secret sources that are default ones, second…
- couldn't parse secret source configuration
- env var ' ' is not a valid boolean value
- failed to initialize cloud secret source
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/5cb0212d0f23bd5a.
Report an issue: GitHub.
Appendix: source
Thrown at internal/cmd/outputs_cloud.go:300
return nil
}
// validateRequiredSystemTags checks if all required tags are present.
func validateRequiredSystemTags(scriptTags *metrics.SystemTagSet) error {
var missingRequiredTags []string
requiredTags := metrics.SystemTagSet(metrics.TagName |
metrics.TagMethod |
metrics.TagStatus |
metrics.TagError |
metrics.TagCheck |
metrics.TagGroup)
for _, tag := range metrics.SystemTagValues() {
if requiredTags.Has(tag) && !scriptTags.Has(tag) {
missingRequiredTags = append(missingRequiredTags, tag.String())
}
}
if len(missingRequiredTags) > 0 {
return fmt.Errorf(
"the cloud output needs the following system tags enabled: %s",
strings.Join(missingRequiredTags, ", "),
)
}
return nil
}
func cloudConfToRawMessage(conf cloudapi.Config) (json.RawMessage, error) {
var buff bytes.Buffer
enc := json.NewEncoder(&buff)
if err := enc.Encode(conf); err != nil {
return nil, err
}
return buff.Bytes(), nil
}
// resolveCloudTestName returns the test name from the config, or derives it from
// the script path when the config name is unset. A name of "-" is replacedView on GitHub (pinned to 01ffac6f24)