用例证据路径
Claude Code observability:从实施到决策
完整的 claude code observability 测量循环连接一个拥有的工作流程、一个有界事件契约、一个受控装置和一个有人可以采取行动的问题。
- 1
设定边界
创建 Telemetry 帐户和 API 密钥。
- 2
捕捉结果
Begin with agent_task_started, agent_task_completed, feature_used and document the grain of each event.
- 3
证明行数
在发货前查看生成的表格、图表和警报。
- 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创建 Telemetry 帐户和 API 密钥。
- 2在功能或可观测性过程开始时将提示粘贴到 Claude Code 中。
- 3要求 Claude Code 运行应用程序流程、发送测试事件并创建仪表板。
- 4在发货前查看生成的表格、图表和警报。
要捕获的事件
agent_task_startedagent_task_completedfeature_usedapi_request_completedcheckout_completedbackground_job_failed
由此解锁的问题
- 哪些智能体编写的功能在发布后实际使用?
- Claude Code 变更在哪里造成支持或可靠性风险?
- 在添加更多自动化之前,哪些工作流程应该收到警报?
事件模式示例
此工作流的事件模式
在将查询或代码片段适应生产之前,请检查行粒度、发出边界、所需类型、隐私类、示例有效负载和验证清单。
相关产品功能
继续此工作流程 仪表板
将经过验证的产品或收入查询转变为集中的决策界面。
相关 SQL 查询示例
更多 SQL 示例
针对此工作流程中的结构化字段运行查询,检查示例结果,并将有用的答案转换为仪表板或警报。
下一步
创建您的智能体将使用的 API 密钥
免费计划足以运行提示、发送测试事件和查看第一个仪表板。
相关页面