Generate OpenTelemetry SDK bootstrap (Node.js / Python), Java agent config, or .NET SDK wiring, plus OTLP wiring for a service. Use when adding OTel instrumentation to a codebase.
Install
npx skillscat add radra23/otel-as-code-plugin/otel-instrument Install via the SkillsCat registry.
otel-instrument (Codex bridge)
Requires the otel-as-code repo. The
commands//skills//agents/files referenced below live there — if they're not present in your workspace, stop and tell the user to add the repo (see AGENTS.md).
Follow the canonical procedure in this repo — it is the single source of truth:
- Read
commands/otel-instrument.md(repo root) and execute its steps. - Apply these knowledge skills as you go:
skills/language-maturity/SKILL.md(gate signals by
maturity /--experimental) andskills/semconv-discipline/SKILL.md(conformant output). - Codex has no subagent dispatch: if the context cache is stale/absent,
otel-instrument.md
runs/otel-initlogic inline — readagents/repo-context-scanner.mdand run that scan
first. Then where it runs theinstrumentation-genagent, readagents/instrumentation-gen.md
and generate the bootstrap files yourself.
Two steps deserve care because getting them wrong writes code that cannot run:
- Step 2 selects a service, not just a language. Filter to services with
generatorSupported: trueand prompt when more than one qualifies; never fall back toservices[0]. A browser SPA reportslanguage: nodejswithruntime: browser— refuse it
with itsinstrumentableReasonrather than generating a Node bootstrap for a bundle. - Step 4 finds the existing bootstrap via
existingOtel.bootstrapFiles, then by globbing the
service subtree — not by testing fortracing.jsin the service root. That test missesapi/src/tracing.tsand writes a second, competing bootstrap beside the real one.
Args: $ARGUMENTS (e.g. python --experimental, --service api, --fix SC-2,SH-1, --force).
Codex note: .codex/hooks.json enforces write-guard + semconv-lint here — a denied overwrite of
an existing bootstrap means regenerate deliberately. --force is a full regeneration: read the
files first and carry their deliberate local decisions across, or use --fix <ids> to apply
specific /otel-evaluate findings in place instead.