安定したイベント契約
エージェントは、名前付きイベント、限定された snake_case フィールド、明示的なユニット、および SQL で有用な識別子に誘導されます。
TypeScript および Python テレメトリ ラッパーの例、安全なイベント境界、SQL 検証、および Claude Code、Codex、Cursor、または別のコーディング エージェントのダッシュボード ワークフローを含むレビュー済みの skill.md をコピーします。
スキルを活かす
準備ができた API キーとエージェント プロンプトから開始し、代表的なワークフローを 1 つ実行し、ダッシュボードを構築する前に結果のイベントを確認します。
スキルがカバーする内容
エージェントは、名前付きイベント、限定された snake_case フィールド、明示的なユニット、および SQL で有用な識別子に誘導されます。
生のプロンプト、入力完了、認証情報、認証ヘッダー、およびプライベート ペイロードは、デフォルトでは分析パスの外に留まります。
代表的なイベントが到着し、クエリまたはダッシュボードによってワークフローが表示されることが証明されるまで、インストルメンテーションは終了しません。
Telemetry ラッパーの例
Pass the API key from trusted server-side configuration and verify a real event with SQL. Anonymous keys support this workflow; claim the workspace before creating dashboards. Keep the Python User-Agent header so requests reach the API.
type TelemetryEvent = Record<string, unknown>;
export async function emitTelemetry(
apiKey: string,
table: string,
data: TelemetryEvent,
) {
const response = await fetch("https://api.telemetry.sh/log", {
method: "POST",
headers: {
Authorization: apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({ table, data }),
});
if (!response.ok) {
throw new Error(`Telemetry ingestion failed: ${response.status}`);
}
}import json
from urllib.request import Request, urlopen
def emit_telemetry(api_key: str, table: str, data: dict) -> int:
request = Request(
"https://api.telemetry.sh/log",
data=json.dumps({"table": table, "data": data}).encode(),
headers={
"Authorization": api_key,
"Content-Type": "application/json",
"User-Agent": "telemetry-agent/1.0",
},
method="POST",
)
with urlopen(request, timeout=5) as response:
return response.statusここから始めましょう
プレースホルダーをサーバー側の API キーに置き換えてから、イベント境界を選択する前にリポジトリを検査するようにエージェントに依頼します。
Instrument this project with structured logs using /skill.md. Use this Telemetry API key: YOUR_API_KEY Anonymous keys: logging and synchronous SQL work without signup. Claim the existing workspace at https://telemetry.sh/register with the same key before creating dashboards or alerts. If it is unclaimed, finish with verified event readback and mark account features as pending signup. Please: 1. Find the most important user-facing flows, background jobs, and AI/tooling workflows. 2. Add structured logging with pragmatic snake_case tables and fields. 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. Prefer small, composable events over giant payloads, and optimize for dashboards that humans can scan quickly.境界をレビューする
このスキルは、エージェントが有用なワークフロー境界を見つけるのに役立ちますが、イベントの意味、許可されたフィールド、保持ポリシー、運用しきい値はチームが所有します。
ワークフローを続行する
制限されたイベント スキーマと、実行、ツール、レイテンシ、コスト、失敗、結果を確認できるダッシュボードから始めます。
オープンガイド有用な実行、ツール、モデル、コスト、失敗、結果の境界を選択します。
オープンガイド製品分析、OpenAI コスト、API、収益、雇用に焦点を当てた概要をコピーします。
オープンガイドイベントの設計、プライバシーの境界、配信動作、検証を確認します。
オープンガイドレビューされたイベント コントラクトと Claude Code 実装パスからの検証ループを適用します。
オープンガイドアクティブ化、保持、および検査可能なダッシュボード インストルメンテーションには、焦点を絞った Cursor ワークフローを使用します。
オープンガイドCodex に、検証付きの製品、信頼性、結果テレメトリに関する限定された概要を提供します。
オープンガイドモデル、トークン、レイテンシー、再試行、および承認された結果のイベントを、レビュー可能な SQL コスト ダッシュボードに接続します。
オープンガイドプロビジョニングされたワークスペース、API キー、エージェント プロンプト、スターター ダッシュボードを無料で使い始めましょう。 1 つの実際のワークフローを接続し、イベントを確認し、最初の有用なクエリを保存します。