sincecutoff.com
← all changes

k6 run and cloud run support feature flags and native histograms

Introduced 2026-06-30 · score 0.96

HOW TO USE IT

When running a k6 script with native histograms, enable the experimental `native-histograms` feature on `k6 run` or `k6 cloud run` so it is propagated with the run. Use `k6 features` to check available flags and their lifecycle.

k6 run --features native-histograms <script.js>
K6_FEATURES=native-histograms k6 run <script.js>
k6 features --json

WHY THIS HELPS

Run a k6 script with experimental native histograms and ensure the flag is applied consistently wherever the run executes.

REQUIREMENTS AND LIMITATIONS

  • Version: v2.1.0
  • Availability: `native-histograms` is experimental; feature flags are opt-in for trialing new, not-yet-stable behavior.
  • --features: Enables feature flags on `k6 run` and `k6 cloud run`; accepts comma-separated or repeated flags.
  • K6_FEATURES: Environment variable for enabling feature flags.
  • features: `config.json` key for enabling feature flags; documented value format and sub-keys not found.
  • native-histograms: Experimental flag that makes k6 use native histograms for trend metrics.
  • --json: Requests JSON output from `k6 features`; output fields not described.
  • Prerequisite: Use k6 v2.1.0 or later for the feature-flag mechanism described here.
  • `--features` accepts comma-separated or repeated flags.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card