core-agent-ide/codex-rs/otel/src
Owen Lin da991bdf3a
feat(otel): Centralize OTEL metric names and shared tag builders (#14117)
This cleans up a bunch of metric plumbing that had started to drift.

The main change is making `codex-otel` the canonical home for shared
metric definitions and metric tag helpers. I moved the `turn/thread`
metric names that were still duplicated into the OTEL metric registry,
added a shared `metrics::tags` module for common tag keys and session
tag construction, and updated `SessionTelemetry` to build its metadata
tags through that shared path.

On the codex-core side, TTFT/TTFM now use the shared metric-name
constants instead of local string definitions. I also switched the
obvious remaining turn/thread metric callsites over to the shared
constants, and added a small helper so TTFT/TTFM can attach an optional
sanitized client.name tag from TurnContext.

This should make follow-on telemetry work less ad hoc:
- one canonical place for metric names
- one canonical place for common metric tag keys/builders
- less duplication between `codex-core` and `codex-otel`
2026-03-09 12:46:42 -07:00
..
events feat(otel): Centralize OTEL metric names and shared tag builders (#14117) 2026-03-09 12:46:42 -07:00
metrics feat(otel): Centralize OTEL metric names and shared tag builders (#14117) 2026-03-09 12:46:42 -07:00
config.rs feat: show runtime metrics in console (#10278) 2026-01-30 22:20:02 -08:00
lib.rs chore(otel): rename OtelManager to SessionTelemetry (#13808) 2026-03-06 16:23:30 -08:00
otel_provider.rs chore(otel): reorganize codex-otel crate (#13800) 2026-03-06 14:58:18 -08:00
otlp.rs feat: metrics capabilities (#8318) 2026-01-08 11:47:36 +00:00
provider.rs chore(otel): reorganize codex-otel crate (#13800) 2026-03-06 14:58:18 -08:00
targets.rs chore(otel): reorganize codex-otel crate (#13800) 2026-03-06 14:58:18 -08:00
trace_context.rs chore(otel): reorganize codex-otel crate (#13800) 2026-03-06 14:58:18 -08:00