Saltar al contenido
Telemetry
Una habilidad de instrumentación revisada para agentes de programación.

Ejemplos de contenedores de observabilidad de Skill.md

Copie un Skill.md revisado con ejemplos de contenedores de telemetría TypeScript y Python, límites de eventos seguros, verificación de SQL y un flujo de trabajo de panel para Claude Code, Codex, Cursor u otro agente de programación.

Pon la habilidad a trabajar

Instrumente un flujo de trabajo de agente real hoy

Comience con una clave API lista y un mensaje de agente, ejecute un flujo de trabajo representativo y verifique el evento resultante antes de crear un panel.

Conectar la telemetría del agente

Qué cubre la habilidad

Instrucciones que terminan en datos inspeccionables

Contratos de eventos estables

El agente es guiado hacia eventos con nombre, campos snake_case delimitados, unidades explícitas e identificadores que siguen siendo útiles en SQL.

Límites de recolección segura

Las indicaciones sin procesar, las completaciones, las credenciales, los encabezados de autorización y las cargas útiles privadas permanecen fuera de la ruta de análisis de forma predeterminada.

Un resultado de principio a fin

La instrumentación no finaliza hasta que llegan los eventos representativos y una consulta o panel demuestra que el flujo de trabajo es visible.

Ejemplos de contenedor Telemetry

Darle al agente un límite de ingestión pequeño y revisable.

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.

mecanografiado

Envoltorio de telemetría TypeScript

javascript
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}`);
  }
}
pitón

Envoltorio de telemetría Python

python
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

Empieza aquí

Pegue un resumen acotado

Reemplace el marcador de posición con una clave API del lado del servidor y luego solicite al agente que inspeccione el repositorio antes de elegir los límites del evento.

aviso del agente

Aviso de observabilidad del agente de IA

text
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 en 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.

Revisar límite

Mantenga a un humano en control del contrato

La habilidad ayuda a un agente a encontrar límites útiles en el flujo de trabajo, pero su equipo aún posee el significado del evento, los campos permitidos, la política de retención y los umbrales operativos.

  • Revise cada tabla y campo nuevos antes de la implementación.
  • Utilice identificadores acotados en lugar de cargas útiles privadas.
  • Verificar el éxito, el fracaso y los resultados terminales.

Continuar el flujo de trabajo

Instrumentar el primer flujo de trabajo y luego inspeccionar el resultado.

Comience gratis con un espacio de trabajo aprovisionado, una clave API, un mensaje para el agente y un panel de inicio. Conecte un flujo de trabajo real, verifique el evento y guarde la primera consulta útil.