{
  "slug": "datadog-ci-measure-and-tag-support-stage-and-step-levels-923616f8984b",
  "title": "datadog-ci measure and tag support stage and step levels",
  "tools": [
    "datadog-ci"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-07T07:28:05.000Z",
  "announced_at": "2026-04-07T07:28:05.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When recording measures or tags in a supported CI provider, set `--level stage` for Azure Pipelines, GitLab, or Jenkins, or `--level step` for GitHub. For Jenkins, update the Datadog plugin to the release required for the new environment variable.",
    "examples": [
      "datadog-ci measure --level stage --measures <key>:<number>",
      "datadog-ci measure --level step --measures <key>:<number>",
      "datadog-ci tag --level <stage|step> --tags <key>:<value>"
    ],
    "gotchas": [
      "Version: v5.12.0",
      "--level: Selects the span: `stage` for the current stage, `step` for the current step. Allowed values are `pipeline`, `job`, `stage`, and `step`.",
      "--measures: Repeatable `key:value` pair(s); each value must be numeric.",
      "--tags: Repeatable `key:value` pair(s) to add as tags.",
      "--no-fail: Prevents command failure when data submission has issues; default is `false`.",
      "Prerequisite: Set `DD_API_KEY` to a valid API key; set `DD_SITE` to the Datadog site. The CLI docs list Buildkite, CircleCI, GitHub, GitLab, Azure Pipelines, and Jenkins as supported providers.",
      "Prerequisite: The release note says Jenkins needs a new Datadog plugin release for the new environment variable; it does not give the required plugin version.",
      "Stages are supported for Azure, GitLab, and Jenkins.",
      "Steps are supported for GitHub Actions.",
      "The Jenkins environment variable requires the new release of the Datadog plugin."
    ]
  },
  "why_it_matters": "When recording pipeline measures or tags in a supported CI environment, attach them to the relevant stage or step span.",
  "sources": [
    "https://github.com/DataDog/datadog-ci/releases/tag/v5.12.0",
    "https://github.com/DataDog/datadog-ci/pull/2180",
    "https://raw.githubusercontent.com/DataDog/datadog-ci/v5.12.0/packages/base/src/commands/measure/README.md",
    "https://raw.githubusercontent.com/DataDog/datadog-ci/v5.12.0/packages/base/src/commands/tag/README.md"
  ],
  "rank": 0.97044,
  "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-6f68d4c3491baf8b-0:gate",
    "evidence_hash": "423ab06f5e4643d6a3f6cc84fca31328595ad47c90170b2200a813380307a9b9"
  },
  "review": {
    "draft_hash": "e1fb8067aa13b7ab782550c6e405d0fc92bca3ba9ea190eb554ac46081c71d56",
    "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.97 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
