[docs-scanner] Confusing Datadog auth_token configuration with unexplained <TOKEN> placeholder

未關閉 適合新手
#26,745 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@O1sumitkumar 已經在處理了。

開始於 2026年11月27日。

  • #26790 來自 @O1sumitkumar —— 未關閉

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
85/100
Issue 類型
文件
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
docker, markdown
領域
documentation

研究方向

開啟 content/manuals/scout/explore/metrics-exporter.md,閱讀第 133 行附近的 Datadog 範例,以及約第 145 行處要求讀者保留 <TOKEN> 預留位置的說明。改寫該說明,以解釋 reader/writer 這對角色:agent 會從掛載的檔案讀取 token,並在執行時將其代入 Authorization 標頭,因此該預留位置必須保持字面形式。檢查附近的 Datadog 章節,看是否有可重複使用的、指向 upstream 認證文件的現有連結,然後確認該頁面仍能透過 docs lint/build target 乾淨地建置。

由索引模型根據 Issue 內容生成。

描述

File: content/manuals/scout/explore/metrics-exporter.md

Issue

The Datadog configuration example includes confusing instructions about the <TOKEN> placeholder that would mislead readers trying to set up authentication.

Around line 133, the configuration shows:

auth_token:
  reader:
    type: file
    path: /var/run/secrets/scout-metrics-exporter/token
  writer:
    type: header
    name: Authorization
    value: Bearer <TOKEN>

Followed by (line ~145):

Do not replace the <TOKEN> placeholder in the previous configuration example. It must stay as it is. Only make sure the Docker PAT is correctly mounted into the Datadog agent in the specified filesystem path.

Why this matters

A reader following these instructions would be confused because:

  1. The instruction to leave <TOKEN> as a literal placeholder contradicts normal configuration practices where placeholders are meant to be replaced
  2. The relationship between the reader section (which reads from a file) and the writer section (which uses the placeholder) is never explained
  3. It's unclear how Datadog knows to substitute the file contents into the <TOKEN> placeholder - this mechanism isn't documented

A reader would reasonably ask: "If I'm mounting the token file at the path specified in reader, why do I also need a writer section with a placeholder? How does the placeholder get replaced with the actual token?"

Suggested fix

Either:

  1. Explain the Datadog agent's token substitution mechanism explicitly:

    The reader section tells the Datadog agent to read the token from the specified file path. The writer section tells the agent to inject that token into the Authorization header, replacing the <TOKEN> placeholder. Do not replace <TOKEN> with your actual token - the agent performs this substitution automatically at runtime.

  2. Or, if this is a Datadog-specific feature, add a reference to Datadog documentation that explains this pattern:

    This configuration uses Datadog's auth_token reader/writer pattern. The agent reads the token from the file specified in reader and automatically substitutes it into the <TOKEN> placeholder in the writer section. For more details, see Datadog's authentication documentation.


Found by nightly documentation quality scanner

主要語言
Markdown
星號
4.7k
分支
8.6k
平均合併
2 天 8 小時
30 天內合併 PR
188

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

docker/docs 的其他 Issue

查看 docker/docs 的全部 Issue

相似的 Issue

更多 Documentation Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。