Consistent event fields
The instructions ask the agent to name events, use snake_case fields, specify units, and include identifiers for SQL joins.
Give your coding agent the skill.md instructions. They include TypeScript and Python wrappers, rules for excluding sensitive data, SQL checks, and steps for building a dashboard.
Put the skill to work
Start with a ready API key and agent prompt, run one representative workflow, and verify the resulting event before building a dashboard.
What the skill covers
The instructions ask the agent to name events, use snake_case fields, specify units, and include identifiers for SQL joins.
Raw prompts, completions, credentials, authorization headers, and private payloads stay out of the analytics path by default.
Run the workflow, check that its events arrive, and query the results before calling the setup finished.
Telemetry wrapper examples
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.statusStart here
Replace the placeholder with a server-side API key, then ask the agent to inspect the repository before choosing event boundaries.
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 in 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.Review boundary
The skill helps an agent choose where to add events. Your team decides what each event means, which fields it may contain, how long to keep it, and when to alert.
Continue the workflow
The SQL dialect, expressions, types, and functions supported by Telemetry's query engine.
Open guideDefine the event fields first. Then build a dashboard to check runs, tool calls, latency, cost, failures, and task results.
Open guideChoose when to record runs, tool calls, model requests, costs, failures, and task results.
Open guideCopy focused briefs for product analytics, OpenAI costs, APIs, revenue, and jobs.
Open guideReview event design, privacy boundaries, delivery behavior, and verification.
Open guideAsk Claude Code to add events with consistent fields and verify them with SQL.
Open guideAsk Cursor to add activation and retention events, then check the dashboard it creates.
Open guideTell Codex which product actions and failures to log, and ask it to verify that the events arrive.
Open guideBuild a SQL dashboard that compares model costs, token use, latency, and retries with accepted results.
Open guideStart free with a provisioned workspace, API key, agent prompt, and starter dashboard. Connect one real workflow, verify the event, and save the first useful query.