{
  "slug": "railway-trace-adds-per-environment-tracing-in-iac-7bfcc301d79b",
  "title": "railway trace adds per-environment tracing in IaC",
  "tools": [
    "railway"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-28T14:17:41.000Z",
  "announced_at": "2026-09-28T14:17:41.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When configuring tracing for a Railway environment, set the service’s `tracing` switches in IaC or enable tracing for that environment with `railway trace`.",
    "examples": [
      "const api = service(\"api\", { tracing: { enabled: true, autoInstrumentation: true } });",
      "railway trace enable --service <SERVICE> --environment <ENVIRONMENT>"
    ],
    "gotchas": [
      "Version: v5.63.0",
      "tracing.enabled: Enables edge tracing and adds `OTEL_*` variables on the service’s next deploy. Omitted or `false` means tracing is off.",
      "tracing.autoInstrumentation: Enables automatic instrumentation; it only takes effect while `enabled` is true. The docs do not say the two switches are mutually exclusive.",
      "--service <SERVICE>: Service name or ID; defaults to the linked service. Conflicts with `--all`.",
      "--environment <ENV>: Selects the environment; defaults to the linked environment.",
      "Prerequisite: IaC tracing requires CLI 5.63.0 or newer and a compatible SDK: TypeScript `railway` 3.12.0+, Python `railway-sdk` 0.4.0+, or Go `railway-go-sdk` v0.3.0+.",
      "Prerequisite: Changing tracing with `railway trace enable` requires a user or workspace token; a project token in `RAILWAY_TOKEN` cannot enable tracing.",
      "Prerequisite: Tracing is a preview feature under active development."
    ]
  },
  "why_it_matters": "Configure tracing separately for each environment in an IaC setup or through `railway trace`.",
  "sources": [
    "https://github.com/railwayapp/cli/releases/tag/v5.63.0",
    "https://docs.railway.com/infrastructure-as-code/reference",
    "https://docs.railway.com/cli/trace"
  ],
  "rank": 0.95027,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3-rejudge+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1-20261014",
    "verdict_id": "wave1-20261014:wave1-20261014-33420bcf9b3d69ff-0:rescue",
    "evidence_hash": "6d6a4077d1b0b2b5b069a7b9f687b5121471aaf3d25f68a1462641a2961bc57c"
  },
  "review": {
    "draft_hash": "1b27895ed324ea852a2e88154f8340238288310c705c476a0a1750c310d31891",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1-20261014:rescue",
    "reason": "Rescue path: first rejected only because the extracted card lacked usage; judged again on the enriched card, 3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.64 (>= 0.6 needed)."
  }
}
