跳至主要內容
Telemetry
對於要求 Claude Code 修改生產應用程式的團隊

Claude Code 可觀測性

給 Claude Code 一個提示,使遙測成為實施過程的一部分,而不是單獨的清理專案。

審閱者 Telemetry產品團隊 . 我們檢查了事件欄位、建議查詢和要排除的資料. 誰負責審查此頁面

在儲存庫中重複使用相同的經過審查的指令 代理遙測skill.md 指南.

為什麼這有效
  • 從與程式碼更改相同的上下文生成的結構化日誌。
  • 代理完成後人們可以檢查的儀表板和 SQL 查詢。
  • 編輯優先的指導,使提示、秘密和原始有效負載遠離事件資料。
用例證據路徑

Claude Code observability:從實施到決策

完整的 claude code observability 測量迴圈連線一個擁有的工作流程、一個有界事件契約、一個受控裝置和一個有人可以採取行動的問題。

  1. 1

    設定邊界

    建立 Telemetry 帳戶和 API 金鑰。

  2. 2

    捕捉結果

    Begin with agent_task_started, agent_task_completed, feature_used and document the grain of each event.

  3. 3

    證明行數

    在發貨前檢視生成的表格、圖表和警示。

  4. 4

    做出決定

    哪些代理編寫的功能在發布後實際使用?

代理提示

將其貼上到您的編碼代理中

更換 YOUR_API_KEY 註冊後,然後要求代理執行產品流程並驗證第一個事件。

代理提示

Claude Code observability 設定提示

text
Instrument this project with structured logs using /skill.md. Use this Telemetry API key: YOUR_API_KEY Anonymous keys support logging and synchronous SQL without signup. Claim the existing workspace at https://telemetry.sh/register with the same key before creating dashboards or alerts. If it is unclaimed, query the event to verify delivery and report which features need signup. Please: 1. Find the most important user-facing flows, background jobs, and AI/tooling workflows. 2. Add structured logging with snake_case table and field names. 3. Capture the key signals for each workflow, including status, latency, identifiers, and error context when relevant. 4. Run one real user-facing or operational flow through the instrumented application and verify its event appears 中 Telemetry. Do not use telemetry_quickstart for this milestone. 5. Run a read-only query over that real event, then create a high-level dashboard with charts and tables that summarize the most important signals in this project. 6. Tell me what you instrumented, which real flow you verified, which tables you created, and which dashboard views I should review first. Keep event payloads small and focused. Make dashboard labels and charts easy to scan.

為此提示建立 API 金鑰,預覽工作代理事件,並在應用程式準備就緒時替換範例。

免費開啟此設定

設定步驟

  1. 1建立 Telemetry 帳戶和 API 金鑰。
  2. 2在功能或可觀測性過程開始時將提示貼上到 Claude Code 中。
  3. 3要求 Claude Code 執行應用程式流程、傳送測試事件並建立儀表板。
  4. 4在發貨前檢視生成的表格、圖表和警示。

要捕獲的事件

agent_task_startedagent_task_completedfeature_usedapi_request_completedcheckout_completedbackground_job_failed

由此解鎖的問題

  • 哪些代理編寫的功能在發布後實際使用?
  • Claude Code 變更在哪裡造成支援或可靠性風險?
  • 在新增更多自動化之前,哪些工作流程應該收到警示?

事件結構描述範例

在將查詢或程式碼片段適應生產之前,請檢查行粒度、發出邊界、所需型別、隱私類、範例有效負載和驗證清單。

相關產品功能

繼續此工作流程 儀表板

將經過驗證的產品或收入查詢轉變為集中的決策介面。

相關 SQL 查詢範例

更多 SQL 範例

針對此工作流程中的結構化欄位執行查詢,檢查範例結果,並將有用的答案轉換為儀表板或警示。

瀏覽所有查詢範例

下一步

建立您的代理將使用的 API 金鑰

免費計劃足以執行提示、傳送測試事件和檢視第一個儀表板。

相關頁面