OpenInference traces for persisted Codex sessions and native OTLP telemetry
Project description
openinference-instrumentation-codex
This package exports Codex activity as OpenInference codex.turn traces from
persisted session files or native OTLP telemetry.
Prerequisites
| Goal | Requirements |
|---|---|
| Install and run the package | Python >=3.10,<3.14 and an OTLP trace destination |
| Forward persisted sessions | Read access to $CODEX_HOME/sessions/**/*.jsonl |
| Receive native telemetry | A Codex producer configured to send OTLP logs and traces |
| Run development workflows | make, uv, and Docker for container or Phoenix checks |
Quick Start
python -m pip install "openinference-instrumentation-codex[otlp]"
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:6006/v1/traces
export OTEL_RESOURCE_ATTRIBUTES='openinference.project.name=codex-local'
codex-jsonl-forwarder --codex-home "${CODEX_HOME:-$HOME/.codex}" \
--state-path .run/codex-jsonl-forwarder-state.json
Persisted-session forwarding can include prompts, responses, and tool results.
Restrict the destination or configure the relevant
OPENINFERENCE_CODEX_CAPTURE_* values before processing sensitive sessions.
Surfaces
| Surface | Primary use |
|---|---|
codex-jsonl-forwarder |
Export existing or watched persisted sessions |
codex-otlp-interceptor |
Receive native Codex OTLP logs and traces |
codex-session-enricher |
Add persisted-session content to an existing native turn |
Repo Map
| Path | Use it for |
|---|---|
src/openinference/instrumentation/codex/ |
Package implementation and CLI entrypoints |
tests/ |
Unit, integration, end-to-end, and evidence-backed coverage |
scripts/ |
Capture, smoke, and artifact-validation helpers |
examples/ |
Example package usage |
docs/ |
Detailed contracts, diagrams, and human project docs |
Documentation
| Document | Use it for |
|---|---|
| AGENTS.md | Concise file routing |
| docs/AGENTS.details.md | Surface contracts, mappings, evidence, tooling, and validation |
| docs/DIAGRAMS.md | Visual package-flow orientation |
| docs/CONTRIBUTING.md | Contribution expectations |
| docs/SECURITY.md | Vulnerability reporting |
| CHANGELOG.md | Release history |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openinference_instrumentation_codex-0.4.0.tar.gz.
File metadata
- Download URL: openinference_instrumentation_codex-0.4.0.tar.gz
- Upload date:
- Size: 117.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ea3cd712e0dfe90e8c908c8c9983685db4c789f465b5db59ab88836ca972c6e
|
|
| MD5 |
35215496a3aeeafe4f6e8fbffffc1ec5
|
|
| BLAKE2b-256 |
23ac7a32fc99e662d3f597a97fbfa1d44ae06577a0214b19dc16e5666164ac46
|
Provenance
The following attestation bundles were made for openinference_instrumentation_codex-0.4.0.tar.gz:
Publisher:
publish-package.yaml on openai-codex-demo/openinference-instrumentation-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openinference_instrumentation_codex-0.4.0.tar.gz -
Subject digest:
5ea3cd712e0dfe90e8c908c8c9983685db4c789f465b5db59ab88836ca972c6e - Sigstore transparency entry: 1711506113
- Sigstore integration time:
-
Permalink:
openai-codex-demo/openinference-instrumentation-codex@fff3c0bf65d973eea815f94ddc17830aba6448d1 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/openai-codex-demo
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yaml@fff3c0bf65d973eea815f94ddc17830aba6448d1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file openinference_instrumentation_codex-0.4.0-py3-none-any.whl.
File metadata
- Download URL: openinference_instrumentation_codex-0.4.0-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa3c4bfbf3ad61f1a8da8e6754258c36ba27001f1b94bbd62b9f0d91a8a166f8
|
|
| MD5 |
119b17700b5909345f13baed1e35800a
|
|
| BLAKE2b-256 |
49f82dbad36c0e7035004793976231c4088ffec4402a2495a84fbcecf9f42a2e
|
Provenance
The following attestation bundles were made for openinference_instrumentation_codex-0.4.0-py3-none-any.whl:
Publisher:
publish-package.yaml on openai-codex-demo/openinference-instrumentation-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openinference_instrumentation_codex-0.4.0-py3-none-any.whl -
Subject digest:
fa3c4bfbf3ad61f1a8da8e6754258c36ba27001f1b94bbd62b9f0d91a8a166f8 - Sigstore transparency entry: 1711506234
- Sigstore integration time:
-
Permalink:
openai-codex-demo/openinference-instrumentation-codex@fff3c0bf65d973eea815f94ddc17830aba6448d1 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/openai-codex-demo
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yaml@fff3c0bf65d973eea815f94ddc17830aba6448d1 -
Trigger Event:
workflow_dispatch
-
Statement type: