Skip to content

Codex tracing and install fixes - #29

Merged
duncankmckinnon merged 4 commits into
mainfrom
logfire-export
Aug 20, 2026
Merged

Codex tracing and install fixes#29
duncankmckinnon merged 4 commits into
mainfrom
logfire-export

Conversation

@duncankmckinnon

Copy link
Copy Markdown
Owner

Summary

  • Rework Codex Logfire export around a turn-level chat <model> span reconstructed from the completed turn in the rollout JSONL (with execute_tool children for paired tool calls), replacing per-event tool export for Codex and deduplicating repeated cumulative token-usage reports.
  • Add a logfire.json_schema companion attribute when flattening nested/array attributes so Logfire renders gen_ai.input.messages / .output.messages as structured chat content instead of opaque text.
  • Add Codex's native hooks.json mechanism (session/subagent/compaction/permission events) alongside the existing notify-based rollout capture, and fix install/uninstall handling for it (including stripping misconfigured Claude hook entries from Codex's config).
  • Fix span ordering so a turn's first chat span can't be sorted ahead of the user message that triggered it when the rollout and hook clocks disagree.

Test plan

  • pytest (see tests/test_otel_export.py, tests/test_otel_worker.py, tests/test_codex_turn.py, tests/test_codex_hooks_json.py, tests/test_codex_install.py)

@duncankmckinnon
duncankmckinnon merged commit 81bfe6b into main Aug 20, 2026
5 checks passed
@duncankmckinnon
duncankmckinnon deleted the logfire-export branch August 21, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant