Skip to content

Support instance-level originator metadata #4822

Closed as not planned
Closed as not planned

Description

@andjohnsonj5

Summary

originator() today doubles as both the logical component identity (e.g. codex_cli_rs) and the process-level identifier that gets copied into OTEL's service.name and outbound request headers. This makes it hard to tag telemetry for specific instances of the CLI.

Current Behaviour

  • The global originator is initialised once at runtime (codex-rs/core/src/default_client.rs).
  • exec attempts to switch it to codex_exec, but only succeeds if nothing else has touched originator() yet.
  • There is no supported way to include per-instance context (hostname, session id, etc.) while keeping the component category.

Desired Behaviour

  • Allow users/config to inject an instance-level tag so OTEL exports can distinguish codex_cli_rs@my-host from other instances.
  • Ensure subcommands such as codex exec can reliably set their own originator before telemetry starts flowing.

Additional Context

Right now we recommend setting the CODEX_INTERNAL_ORIGINATOR_OVERRIDE env var, but any code path that accesses originator() before the override runs leaves us stuck with the default value. Exposing a supported mechanism (for example, by adding a separate instance-id attribute to the OTEL resource and tolerating overrides in exec) would unblock observability dashboards.

Activity

  1. added
    enhancement
    on Oct 6, 2025
  2. github-actions commented on Oct 6, 2025

    @github-actions
    Contributor
  3. added
    enterprise
    on Nov 28, 2025
  4. etraut-openai commented on Jan 14, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received any upvotes, so I'm going to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancemententerprise

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions