# Telemetry

> Manages observability including error tracking, logging, metrics, and analytics. Covers instrumentation strategy, event definitions, and monitoring setup. Use when setting up monitoring, instrumenting events, or debugging production issues.

- **Type:** Skill
- **Install:** `agentstack add skill-pvnarp-agent-skills-telemetry`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [pvnarp](https://agentstack.voostack.com/s/pvnarp)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [pvnarp](https://github.com/pvnarp)
- **Source:** https://github.com/pvnarp/agent-skills/tree/main/skills/telemetry

## Install

```sh
agentstack add skill-pvnarp-agent-skills-telemetry
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Telemetry & Observability

Three pillars: **Errors** (what broke), **Metrics** (how it's performing), **Logs** (what happened).

## Error Tracking

### Strategy
- Use a dedicated error tracking service (Sentry, Bugsnag, Rollbar, etc.)
- Capture unhandled exceptions automatically
- Add breadcrumbs at key application events for context
- Group errors by root cause, not by stack trace variation

### Setup Pattern
```
1. Install SDK
2. Initialize early in application startup
3. Configure environment (dev/staging/production)
4. Set sample rate for performance tracing (10-20% is typical)
5. Upload source maps / debug symbols for readable stack traces
```

### Breadcrumbs
Add context at key moments so error reports tell a story:
- User actions (navigation, form submissions, key interactions)
- State transitions (login, mode changes, configuration updates)
- External calls (API requests, DB queries)

## Metrics

### Key Metrics to Track

| Category | Metrics |
|----------|---------|
| Availability | Uptime, error rate, success rate |
| Performance | Response time (p50, p95, p99), throughput |
| Resources | CPU, memory, disk, connections |
| Business | Active users, key actions, conversion |

### Alerting Rules
- Alert on symptoms, not causes (high error rate, not "disk at 80%")
- Set meaningful thresholds based on actual baselines
- Include runbook links in alerts
- Avoid alert fatigue - every alert should require action

## Logging

### Levels
| Level | When |
|-------|------|
| ERROR | Something broke and needs attention |
| WARN | Something unexpected but handled |
| INFO | Significant application events |
| DEBUG | Detailed diagnostic info (dev/staging only) |

### Rules
- Structured logging (JSON) in production for parseability
- Include correlation IDs for request tracing
- Never log secrets, PII, or full request bodies with sensitive data
- Keep log volume manageable - noisy logs get ignored

## Analytics Events

Define events that answer business questions:

```
EVENT: [name]
WHEN: [trigger condition]
PAYLOAD: [relevant data fields]
QUESTION IT ANSWERS: [what you learn from this]
```

### Offline-First Pattern
Queue events locally when offline. Flush on connectivity. Batch inserts for efficiency. Dedup on the server if needed.

## Phase Rollout
1. **First:** Error tracking (know when things break)
2. **Next:** Key metrics (know how things perform)
3. **Then:** Structured logging (know what happened)
4. **Finally:** Analytics (know how users behave)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [pvnarp](https://github.com/pvnarp)
- **Source:** [pvnarp/agent-skills](https://github.com/pvnarp/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pvnarp-agent-skills-telemetry
- Seller: https://agentstack.voostack.com/s/pvnarp
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
