{
  "slug": "k6-run-and-cloud-run-support-feature-flags-and-native-histograms-76324fc7450d",
  "title": "k6 run and cloud run support feature flags and native histograms",
  "tools": [
    "k6"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-30T08:56:09.000Z",
  "announced_at": "2026-06-30T08:56:09.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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.",
    "examples": [
      "k6 run --features native-histograms <script.js>",
      "K6_FEATURES=native-histograms k6 run <script.js>",
      "k6 features --json"
    ],
    "gotchas": [
      "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."
    ]
  },
  "why_it_matters": "Run a k6 script with experimental native histograms and ensure the flag is applied consistently wherever the run executes.",
  "sources": [
    "https://github.com/grafana/k6/releases/tag/v2.1.0"
  ],
  "rank": 0.96037,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-f5a2c73dc19919f0-1:gate",
    "evidence_hash": "0090b299045eea76f39a725a7b13f9daa28e12105abc5133dcf02903bfef7472"
  },
  "review": {
    "draft_hash": "b433955e9c93009c6993db0b27ac74cf1afe9e0237e1b657ff4c80c3529b9189",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
