Skip to main content
skill CX Codex

otel-semantic-conventions · ollygarden — Claude Code skill for OTel semconv

A skill that looks up released OpenTelemetry semantic conventions: group names, attributes and span naming rules. Useful when the agent would otherwise invent keys.

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

What otel-semantic-conventions does

The skill keeps the agent from writing attribute names out of model memory. It picks the closest released group by boundary type — http, db, messaging, rpc or network — and adds neighbouring groups only when they carry needed context. The full spec never goes into context: a bundled script, ./scripts/query-otel-semantic-conventions.sh, pulls a single group or attribute.

Span names come straight from the released naming rule. Protocol labels, hostnames, product names and business hints do not get glued onto names the convention governs. Where the rule offers no low-cardinality target, the simpler fallback allowed by that convention applies. With no released key available, a stable custom namespace with bounded values is the way out.

For gen_ai.*, OpenAI and MCP conventions the skill points to open-telemetry/semantic-conventions-genai. That repo has no tagged release as of 2026-10-19, so guidance gets cited by commit and marked unreleased; the lookup script does not cover it. To verify against a checked-out upstream repo, set OTEL_SEMCONV_REPO=/path/to/semantic-conventions. After touching the parser, run OTEL_SEMCONV_REPO=/path/to/semantic-conventions bash ./scripts/test-query-otel-semantic-conventions.sh. Answers are expected to carry the group name, released version and source URL from the script output — otherwise nobody can check compliance.

What it helps with

  • pick a released convention group for a boundary type
  • check span attributes against the convention
  • derive a span name from the released naming rule
  • find which semconv version an SDK package exposes
  • separate released conventions from unreleased GenAI guidance

Example prompts for the agent

  • Pick the semantic convention group for an HTTP server and list the attributes I need.
  • Check the span names in tracing.py against the released OTel rules.
  • Which semconv version does the Go SDK package expose? Check the package reference.

How to install otel-semantic-conventions

1Skills CLI (Vercel)

npx skills add ollygarden/opentelemetry-agent-skills --skill otel-semantic-conventions -a claude-code

2Manually: put the files in place

~/.claude/skills/otel-semantic-conventions/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/otel-semantic-conventions/

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

Questions about otel-semantic-conventions

How do I install otel-semantic-conventions in Claude Code?

Run npx skills add ollygarden/opentelemetry-agent-skills --skill otel-semantic-conventions -a claude-code. The skill file lands at ~/.claude/skills/otel-semantic-conventions/SKILL.md.

What does otel-semantic-conventions do?

It queries released OpenTelemetry semantic convention groups and attributes through a bundled script and supplies span naming rules. It also checks existing code for compliance.

Does the skill cover GenAI and MCP conventions?

No. For gen_ai.*, OpenAI and MCP it sends you to open-telemetry/semantic-conventions-genai, which has no tagged release, so the guidance is cited by commit and labelled unreleased.

Source text

SKILL.md · Apache-2.0
---
name: otel-semantic-conventions
description: OpenTelemetry semantic convention lookup and naming guidance. Use when selecting released semantic convention groups, attributes, or span naming rules, when checking semantic convention compliance, or checking which semantic-conventions version a language SDK's semconv package exposes.
---

# OpenTelemetry Semantic Conventions

Use this skill when you need released semantic convention guidance for naming, attributes, or compliance checks.


## Workflow

1. Start with released semantic conventions, not model memory.
- do not load the full semantic convention spec into context
- use the bundled lookup script to query only the needed released group or attribute
- for local verification against a checked-out upstream repo, set `OTEL_SEMCONV_REPO=/path/to/semantic-conventions`

2. Choose the closest released group before inventing custom keys.
- identify the boundary type such as `http`, `db`, `messaging`, `rpc`, or `network`
- pick one primary group first, then add related groups only when they add needed context
- for `gen_ai.*`, OpenAI, or MCP conventions, use [`open-telemetry/semantic-conventions-genai`](https://github.com/open-telemetry/semantic-conventions-genai); it has no tagged release as of 2026-10-19, so cite the commit and label the guidance unreleased (the lookup script does not cover it); the core repository keeps only deprecated GenAI-era stubs after v1.42.0
- see `references/semconv-selection.md`
- to target a version a language's semconv package actually exposes (works offline, dated), see `references/sdk-semconv-packages.md`

3. Query only the released guidance you need.
- list groups: `./scripts/query-otel-semantic-conventions.sh --groups`
- inspect one group: `./scripts/query-otel-semantic-conventions.sh http`
- inspect one kind: `./scripts/query-otel-semantic-conventions.sh http spans`
- inspect one exact attribute or entry: `./scripts/query-otel-semantic-conventions.sh http http.request.method`
- see `references/otel-semantic-conventions.md`
- after changing the parser, run `OTEL_SEMCONV_REPO=/path/to/semantic-conventions bash ./scripts/test-query-otel-semantic-conventions.sh`

4. Apply the released naming and attribute rules directly.
- use required and recommended attributes before optional ones
- derive semconv-governed span names directly from the released naming rule
- do not prepend or append protocol labels, hostnames, product names, business hints, or other custom prose to semconv-governed span names
- if the released naming rule does not provide a low-cardinality target, use the simpler fallback allowed by that convention
- if no released key exists, use a stable custom namespace and keep values bounded

5. Return the result with exact source context.
- include the group name, released version, and source URL from the script output
- call out any concrete compatibility limitation if the implementation cannot fully match the released guidance

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

Similar skills

All skills for DevOps and infrastructure →

otel-semantic-conventions by other authors comes first.

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