{
  "slug": "k6-prometheus-remote-write-adds-static-labels-a13f5889146d",
  "title": "k6 Prometheus remote write adds static labels",
  "tools": [
    "k6"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-21T15:17:03.000Z",
  "announced_at": "2026-09-21T15:17:03.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When multiple k6 processes send metrics to the same Prometheus endpoint, set `K6_PROMETHEUS_RW_LABELS` to comma-separated `key=value` labels and run with `--out experimental-prometheus-rw` so each process's time series can be distinguished.",
    "examples": [
      "K6_PROMETHEUS_RW_LABELS=\"environment=production,server=srv1\" k6 run --out experimental-prometheus-rw <script.js>"
    ],
    "gotchas": [
      "Version: v2.3.0",
      "K6_PROMETHEUS_RW_LABELS: Comma-separated `key=value` pairs of static labels for remote-write time series; defaults to no additional labels.",
      "--out experimental-prometheus-rw (required): Selects the Prometheus remote write output for the k6 run.",
      "<script.js> (required): Path to the k6 test script; the docs use `script.js` as the example.",
      "Prerequisite: Set up a running Prometheus remote-write endpoint and ensure k6 can reach it. For Prometheus 2.x, enable `--web.enable-remote-write-receiver`.",
      "Prerequisite: The Prometheus remote-write output is experimental."
    ]
  },
  "why_it_matters": "When running tests from multiple k6 instances that send metrics to the same Prometheus server, label each instance's time series.",
  "sources": [
    "https://github.com/grafana/k6/releases/tag/v2.3.0",
    "https://grafana.com/docs/k6/latest/results-output/real-time/prometheus-remote-write/"
  ],
  "rank": 0.98032,
  "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-65a244af489b5976-4:gate",
    "evidence_hash": "dba6ea361338a6ce929886692010d6448197e9e669546fe9ff9e6f7cea7e9e36"
  },
  "review": {
    "draft_hash": "7cb3b4db114387f3c80d4905bd3f8a31814f3009d693f030eb3de8ee2d690ea1",
    "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.98 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
