# Observability and instrumentation

> Observability and instrumentation is an open-source agent skill for developer tools. Guides agents to add structured logs, metrics, tracing and alerts to production code. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/addyosmani/agent-skills/tree/main/skills/observability-and-instrumentation
- **Repository:** https://github.com/addyosmani/agent-skills
- **GitHub stars:** 122,545
- **License:** MIT
- **Skill name:** observability-and-instrumentation
- **Collection:** https://github.com/addyosmani/agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill teaches an agent to build observability into a feature while it is written, rather than after launch. It starts by having the agent name the questions an on-call engineer would ask, then chooses between structured logs, metrics and traces to answer each one. The guidance covers JSON log events with stable names, correlation IDs on every line, and an entry-point field when several triggers write to the same log sink.

For metrics it applies RED on endpoints and dependencies and USE on resources, with bounded label sets and histograms read at p95 and p99. For tracing it points to OpenTelemetry auto-instrumentation plus a few manual spans. For alerting it favors symptom-based rules with two severities, runbook links, and a test firing before they are trusted, and it includes a runbook template kept under docs/runbooks.

No scripts are bundled. The agent works directly in the codebase with its own tools, and the examples use TypeScript, Express, prom-client and the OpenTelemetry Node SDK.

## When your agent uses it

> Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/addyosmani/agent-skills/tree/HEAD/skills/observability-and-instrumentation)
- [License: MIT](https://github.com/addyosmani/agent-skills/tree/HEAD/skills/observability-and-instrumentation)

## Features

- **Question-first signal planning:** Has the agent write down on-call questions for a feature and map each planned signal to one of them.
- **Structured logging rules:** Covers JSON event logs, log level usage, request correlation IDs and redaction of secrets and PII.
- **RED and USE metrics:** Guides endpoint and dependency metrics with bounded labels, histograms and percentile-based latency.
- **OpenTelemetry tracing setup:** Shows auto-instrumentation with the Node SDK, targeted manual spans and context propagation across async hops.
- **Symptom-based alerting:** Sets rules for actionable alerts with thresholds, two severities and linked runbooks.
- **Telemetry verification steps:** Lists checks such as inducing a staging error and confirming it can be found through logs alone.

## Good for

- Add structured logging and request IDs to a new checkout or payment flow
- Set up RED metrics for the HTTP endpoints of an API service
- Create a symptom-based alert with a short runbook for high error rates
- Instrument a background job so its runs can be traced to their trigger
- Review a pull request that adds queues or external calls for missing telemetry

## Install

### Claude Code

This skill ships in the `agent-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add chrisalehman/bionic
/plugin install agent-skills@bionic
```

Or copy only this skill to `~/.claude/skills/observability-and-instrumentation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/observability-and-instrumentation &&
cp -R "$tmp/skills/observability-and-instrumentation" ~/.claude/skills/observability-and-instrumentation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/observability-and-instrumentation` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/observability-and-instrumentation` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/observability-and-instrumentation &&
cp -R "$tmp/skills/observability-and-instrumentation" ~/.agents/skills/observability-and-instrumentation &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/observability-and-instrumentation` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/observability-and-instrumentation` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/observability-and-instrumentation &&
cp -R "$tmp/skills/observability-and-instrumentation" ~/.cursor/skills/observability-and-instrumentation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/observability-and-instrumentation` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/addyosmani/agent-skills.git --path skills/observability-and-instrumentation
```

Or copy the folder to `~/.gemini/skills/observability-and-instrumentation` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/observability-and-instrumentation`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/addyosmani/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/observability-and-instrumentation &&
cp -R "$tmp/skills/observability-and-instrumentation" ~/.copilot/skills/observability-and-instrumentation &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/observability-and-instrumentation` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/addyosmani/agent-skills.git
```

Then copy `agent-skills/skills/observability-and-instrumentation` into your agent's skills folder as `observability-and-instrumentation`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Observability and instrumentation trigger?

When adding logging, metrics, tracing or alerting, when shipping a production feature that needs evidence it works, or when production issues cannot be diagnosed from existing data.

### Does Observability and instrumentation cover debugging a live incident?

No. Live failures are handled by the debugging-and-error-recovery skill. This skill covers the instrumentation that makes such debugging faster.

### Which libraries does Observability and instrumentation use in its examples?

Its examples use TypeScript with Express, the prom-client Prometheus library for metrics, and the OpenTelemetry Node SDK for tracing. It notes that the metrics rules apply to other backends too.

### Does Observability and instrumentation need any scripts or extra tools?

The skill bundles no scripts and sets no allowed tools. It works through the agent's normal editing and inspection abilities.

### How do I install Observability and instrumentation in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/observability-and-instrumentation to use it in all your projects, or to .claude/skills/observability-and-instrumentation in one project. Or install the agent-skills plugin, which includes it: /plugin marketplace add chrisalehman/bionic, then /plugin install agent-skills@bionic.

### Does Observability and instrumentation run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Observability and instrumentation?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Observability and instrumentation?

The closest alternatives to Observability and instrumentation are Go observability, Observability agent, Enterprise agent ops, Spring observability and Troubleshoot observability.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Go observability](https://ai-powered.com/skills/go-observability): Go observability is an open-source agent skill for developer tools.
- [Observability agent](https://ai-powered.com/skills/observability-agent): Observability agent is an open-source agent skill for developer tools.
- [Enterprise agent ops](https://ai-powered.com/skills/enterprise-agent-ops): Enterprise agent ops is an open-source agent skill for developer tools.
- [Spring observability](https://ai-powered.com/skills/spring-observability): Spring observability is an open-source agent skill for developer tools.
- [Troubleshoot observability](https://ai-powered.com/skills/troubleshoot-observability): Troubleshoot observability is an open-source agent skill for cloud and infrastructure.
- [Observability gap](https://ai-powered.com/skills/observability-gap): Observability gap is an open-source agent skill for developer tools.
- [Agent harness construction](https://ai-powered.com/skills/agent-harness-construction): Agent harness construction is an open-source agent skill for developer tools.
- [Ollygarden otel SDK setup](https://ai-powered.com/skills/ollygarden-otel-sdk-setup): Ollygarden otel SDK setup is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/observability-and-instrumentation
