Skip to main content
skill CX Codex

otel-component-telemetry — Claude Code skill: OTel telemetry inventory

Scans one OpenTelemetry component at pinned versions and records the spans, metrics and logs it emits as change-point files.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-telemetry-emission-scan -a claude-code
Open on GitHub

What otel-component-telemetry does

The skill takes a single OpenTelemetry component and builds an inventory of what it emits: span names, metrics with units, log and event names. Only pinned tags get scanned; branches are out of scope. The repo is already cloned at /tmp/otel-component-telemetry/<repo basename>, so you do not clone it yourself.

The procedure is spelled out step by step. Versions come from git tag, each one is checked out into its own temp directory with git worktree add, and the agent follows instrument, span and log construction down to the recording sites. Literal names are captured after prefixes and namespaces are applied. Gated signals still get a row, with the gate named in the Notes column. Before writing, the skill reconciles against an existing component/version file instead of creating a second path, then runs python3 tools/otel-telemetry-emission-scan/scripts/validate.py --component '${Repo}/${Path}' from the repository root. That validator checks provenance and source paths, not semantic completeness.

A version whose file already carries a verification date is skipped. With force: true the skill scans anyway and edits only rows that are wrong or missing. Files of other components stay untouched. This is an authoring-time skill: scripts/scan.sh invokes it headless, one agent per component from config.json, and it is not shipped.

What it helps with

  • list the spans and metrics one OpenTelemetry component emits
  • pin down units and attributes from the recording sites in code
  • flag conditional signals together with their feature gates
  • reconcile an existing version file instead of rewriting it
  • run the validator over provenance and source paths before accepting output

Example prompts for the agent

  • Scan receiver/kafkareceiver across the last three releases and write the telemetry inventory
  • Recheck the file for version v0.158.0 and fix only the wrong rows
  • Scan the exact tag v1.16.0 and name the gates for conditional metrics in Notes

How to install otel-component-telemetry

1Skills CLI (Vercel)

npx skills add ollygarden/opentelemetry-agent-skills --skill otel-telemetry-emission-scan -a claude-code

2Manually: put the files in place

~/.claude/skills/otel-telemetry-emission-scan/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/otel-telemetry-emission-scan/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about otel-component-telemetry

How do I install otel-component-telemetry in Claude Code?

Run npx skills add ollygarden/opentelemetry-agent-skills --skill otel-telemetry-emission-scan -a claude-code. The skill file then sits at ~/.claude/skills/otel-telemetry-emission-scan/SKILL.md.

What does otel-component-telemetry do?

It scans one OpenTelemetry component at pinned upstream versions and records its spans, metrics and logs as change-point files under skills/otel-telemetry-emissions/.

Can it scan a branch instead of a tag?

No. Only pinned tags are scanned, and each version is checked out into its own temp directory with git worktree add.

Source text

SKILL.md · Apache-2.0
---
name: otel-component-telemetry
description: Scan one OpenTelemetry component at pinned upstream versions and record the telemetry it emits (spans, metrics, logs) as change-point files under skills/otel-telemetry-emissions/. Invoked headless by scripts/scan.sh, one agent per component from config.json. Authoring-time only — not shipped.
---

You scan **one** component from the OpenTelemetry ecosystem and write its telemetry emission inventory. 

Repo: ${Repo}
Path: ${Path}
Versions to scan: ${Version}
Tag prefix: ${TagPrefix}
Force: ${Force}
Output root: ${OutDir}

## Procedure

1. **Resolve versions.** The repo is already cloned locally at `/tmp/otel-component-telemetry/<repo basename>` — do not clone it yourself. `Versions to scan` is either a count of recent releases or one exact tag. For a count, list that many released versions from `git tag`. For an exact tag, scan only that tag. When `Tag prefix` is non-empty, consider only tags beginning with that literal prefix, check out the full tag, and strip the prefix to obtain the version used in frontmatter and the output filename. For independently versioned packages, confirm the package version in its manifest or `version.py`, even when a repository release tag exists (e.g. Python repo tag `v1.16.0` contains instrumentation `0.37b0`). Use that package version for the filename and `version`, and `git rev-parse '<tag>^{commit}'` for the full `commit_sha`.

   For Python count requests, select recent instrumentation beta tags (`v<major>.<minor>b<revision>`); the historical SDK tag `v1.16.0` is supported only as an exact-tag request. Normalize the filename and `version` to exactly one leading `v`.

2. **Get source.** Check out each resolved tag into its own temp directory: `git worktree add "$(mktemp -d)" <tag>`. Never scan a branch — only pinned tags.

3. **Ground truth in the code.** Follow instrument/span/log construction through shared helpers and generated code. Record literal names after prefixes and namespaces are applied, exact units, and attributes from recording sites; semantic-convention definitions alone do not prove emission. Distinguish generated pipeline telemetry from the component's internal telemetry. Read the actual meter/tracer scope creation; when rows use different scopes, name them in `Notes` rather than assigning the component's path to all rows.

4. **Record conditionality.** If a signal, metric, or attribute is gated (feature gate, opt-in config, experimental semconv env var, framework/runtime version), it still gets a row — with the gate and default named in `Notes`. Check both branches and client/server recording sites separately. If emission is delegated to a runtime/library outside the pinned repository, identify that boundary and source instead of claiming its telemetry was verified here.
5. **Recheck before writing.** Compare each row to its construction and recording sites, specifically checking prefixes/separators, scopes, units, attribute sets, and disabled/default branches. List exact source paths present at the pinned commit; do not cite guessed paths or abbreviate them with `...`. Reconcile an existing component/version file rather than creating another path. Set `last_verified` to today's date only after this source check, never copy a date from another version. Run `python3 tools/otel-telemetry-emission-scan/scripts/validate.py --component '${Repo}/${Path}'` from the repository root. This checks provenance and source paths, not semantic completeness; fix failures before accepting output.

## Updates

- A version whose file already exists with a non-null verification date is **skipped**. A `last_verified: null` file needs a source recheck and reconciliation even without force.
- If your prompt says `force: true`, scan it anyway and **reconcile**: compare our findings with the existing file and edit only rows that are wrong or missing. Do not rewrite the whole file.

Never modify files of other components.

## Output

Output one file per **scanned version** under the output root given above, mirroring repo + path:

```
${OutDir}/<repo basename>/<path>/v<version>.md
```

Example: `${OutDir}/opentelemetry-collector-contrib/receiver/kafkareceiver/v0.158.0.md`

Follow the below format strictly:

````md
---
repo: $repo
path: $path
version: v$version
scope_name: $scope_name
commit_sha: $full_commit_sha
last_verified: $YYYY-MM-DD
---

# $component

## Traces

| Span name | Kind | Attributes | Notes |
|---|---|---|---|

## Metrics

| Metric name | Type | Unit | Attributes | Notes |
|---|---|---|---|---|

## Logs

| Log/event name | Attributes | Notes |
|---|---|---|

## Sources

- $files_consulted
````

Omit any signal section the component does not emit — never write empty tables. `Notes` names the gate when emission is conditional, `-` otherwise.

© ollygarden · Apache-2.0 · ollygarden/opentelemetry-agent-skills

Similar skills

All skills for DevOps and infrastructure →

From the same set7

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor