Claude Code observability: 実装から決定まで
完全な claude code observability 測定ループは、1 つの所有ワークフロー、制限されたイベント コントラクト、制御されたフィクスチャ、および誰かが行動できる質問を接続します。
- 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 セットアップ プロンプト
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 キーを作成し、動作中のエージェント イベントをプレビューし、アプリケーションの準備ができたらサンプルを置き換えます。
このセットアップを無料で開くセットアップ手順
- 1Telemetry アカウントと API キーを作成します。
- 2機能または可観測性パスの開始時に、プロンプトを Claude Code に貼り付けます。
- 3Claude Code にアプリ フローの実行、テスト イベントの送信、ダッシュボードの作成を依頼します。
- 4出荷前に、結果の表、グラフ、アラートを確認してください。
キャプチャするイベント
これにより解き明かされる質問
- エージェントが作成した機能のうち、リリース後に実際に使用されるのはどれですか?
- Claude Code の変更により、サポートまたは信頼性のリスクが生じているのはどこですか?
- さらに自動化を追加する前に、どのワークフローがアラートを受け取る必要がありますか?
イベントスキーマの例
このワークフローのイベントスキーマ
クエリまたはスニペットを運用環境に適用する前に、行粒度、出力境界、必要なタイプ、プライバシー クラス、サンプル ペイロード、および検証チェックリストを確認してください。
関連製品の機能
このワークフローを続行します ダッシュボード
検証された製品または収益のクエリを、焦点を絞った意思決定の表面に変えます。
関連する SQL レシピ
その他のSQL例
このワークフローの構造化フィールドに対してクエリを実行し、結果の例を検査して、有用な回答をダッシュボードまたはアラートに変換します。
次のステップ
エージェントが使用する API キーを作成します
プロンプトの実行、テスト イベントの送信、最初のダッシュボードの確認には無料プランで十分です。
関連ページ