skill.injected metric tag value not sanitized — skills with ":" in name are dropped (tag value contains invalid characters)
Open 💬 1 comment Opened Jun 11, 2026 by vzd3v
Version
- codex-cli
0.137.0(rust) - opentelemetry rust sdk
0.31.0 [otel]exporter enabled (otlp-http)
What happens
When a skill whose name contains a colon is injected into a session, Codex fails to record the codex.skill.injected metric and emits a WARN log instead:
metrics counter [codex.skill.injected] failed: tag value contains invalid characters: myplugin:myskill
A colon is a legitimate separator in plugin-namespaced skill names (<plugin>:<skill>), so every plugin-provided skill triggers this on injection. The metric is silently dropped and one WARN is logged per occurrence.
Expected
Codex should sanitize/escape metric tag (attribute) values that contain characters disallowed by the metrics backend — e.g. replace or strip them — so codex.skill.injected is recorded rather than dropped. Alternatively, document the allowed character set for skill names/tag values.
Impact
codex.skill.injectedis lost for all plugin-namespaced skills, leaving a blind spot in skill-usage metrics.- WARN-level log noise on the OTel pipeline for every injection of such a skill.
Repro
- Register/install a plugin-namespaced skill so its name contains a colon (e.g.
myplugin:myskill). - Enable OTel (
[otel]with any exporter). - Start a session where that skill is injected.
- Observe the WARN above; no
codex.skill.injecteddata point is emitted for it.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗