{
  "slug": "vercel-traces-config-set-adds-or-replaces-a-sampling-rule-ba5cc99af720",
  "title": "vercel traces config set adds or replaces a sampling rule",
  "tools": [
    "vercel"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-22T22:39:39.209Z",
  "announced_at": "2026-08-22T22:39:39.209Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When adding or changing one sampling rule, run `vercel traces config set <environment> <rate> [requestPath]`; use `any`, `preview`, or `production` and a whole rate from 1 to 100. The rule is matched by environment and path prefix, so repeating that pair changes its rate.",
    "examples": [
      "vercel traces config set <environment> <rate> [requestPath]"
    ],
    "gotchas": [
      "Version: 59.5.0",
      "<environment> (required): `any`, `preview`, or `production`; `any` matches every environment.",
      "<rate> (required): Whole percentage from 1 to 100: percentage of matching requests to trace.",
      "[requestPath]: Path prefix, such as `/api`; omit to match every path.",
      "--project <name-or-id>: Select project; defaults to the linked project.",
      "--json: Output the new rule as JSON.",
      "Prerequisite: Vercel CLI must be installed and authenticated to access resources or perform administrative tasks.",
      "Prerequisite: Changing sampling rules requires a role with project update access.",
      "Environment and rate are checked before the API call.",
      "Rules are identified by environment and path prefix.",
      "The success line reports the old rate, new rate, and rule count.",
      "Drain domains, ignore paths, and rules not being changed are written back untouched.",
      "Only the rule being written is rebuilt from the command line; editing another rule does not round a fractional rate that the API accepts but the CLI cannot express.",
      "An eleventh rule is refused with an error naming the ten-rule limit."
    ]
  },
  "why_it_matters": "Add or change one trace sampling rule for a project.",
  "sources": [
    "https://github.com/vercel/vercel/blob/main/packages/cli/CHANGELOG.md#5950",
    "https://vercel.com/docs/cli/traces",
    "https://vercel.com/docs/cli"
  ],
  "rank": 0.95033,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "vercel-20261007",
    "verdict_id": "vercel-20261007:vercel-20261007-9a64e6dc630fc55c-2:gate",
    "evidence_hash": "c50221bf6c58d371217fe9f7b23df99f22485abc6cb7a2c260bb264e37cd7bc2"
  },
  "review": {
    "draft_hash": "5892f1f5c2647a5b0be20f647cd43facd6c72264371ddeb7c93f5937b11cef22",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "vercel-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.75 (>= 0.6 needed)."
  }
}
