Task · CXO-0011

Stop classifying codexlb turns as Agent Observability subagents

Description

codexlb2otel emits agent names such as codexlb/codex-tui. OpenTelemetry permits the value, but Grafana Agent Observability interprets a slash as a subagent marker, so normal turns are misclassified and agent filters and counts break.

Acceptance Criteria

Definition of Done

Implementation Plan

  1. Change the pinned agent-name expectations to slash-free codexlb- values and observe the targeted failure.
  2. Change the shared AgentName prefix and update its contract comments and bounded registry catalogue.
  3. Run targeted tests, make check, and go build ./…; review the staged code; then finalize, commit, and push.

Implementation Notes

Added a focused AgentName regression test covering all three known originators and the missing-originator fallback. Observed it fail against the slash prefix, then changed the shared prefix to a hyphen and updated generation, metric, trace, and bounded-registry expectations. Targeted tests pass.

Verification: the focused regression test failed before the production change and passed after it; generation wire-format, OTLP metric, and OTLP trace contract tests passed; make check passed including the 206-second corpus-backed internal/attr package; go build ./… passed; CodeRabbit reviewed all seven staged files with zero findings.

Final Summary

Changed the shared agent-name prefix from codexlb/ to codexlb- so Grafana Agent Observability no longer classifies ordinary turns as subagents. Preserved distinct originator identities and the non-anonymous codexlb fallback. Verified every sink contract, the full repository gate, the full build, and a zero-finding CodeRabbit review.

References

View the source file on GitHub