SigNoz Cloud - This page is relevant for SigNoz Cloud editions.
Self-Host - This page is relevant for self-hosted SigNoz editions.

OpenAI Codex Observability & Monitoring with OpenTelemetry

Overview

OpenAI Codex is an AI-powered coding assistant designed to help developers write, understand, and debug code through natural language interactions. It translates natural language into code and can work across multiple programming languages.

This guide walks you through setting up observability and monitoring for OpenAI Codex using OpenTelemetry and exporting traces and logs to SigNoz. With this integration, you can observe and track various metrics for your Codex AI coding assistant usage.

Prerequisites

Monitoring Codex

Step 1: Set up Codex

For more information on getting started with Codex in your environment, refer to the Codex quickstart guide.

Install the Codex extension for your IDE:

Once installed, the Codex extension appears in the sidebar alongside your other extensions. It may be hidden in the collapsed section. You can move the Codex panel to the right side of the editor if you prefer.

Sign in with your ChatGPT account or API key to get started.

Codex starts in Agent mode by default, which lets it read files, run commands, and write changes in your project directory.

Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.

Step 2: Enable OpenTelemetry (OTel) export to track Codex runs

For more information on setting up telemetry for Codex, refer to the Codex observability guide.

Codex stores its configuration at ~/.codex/config.toml.

Append the following to ~/.codex/config.toml:

~/.codex/config.toml
[otel]
log_user_prompt = true
exporter = { otlp-grpc = {
  endpoint = "https://ingest.<region>.signoz.cloud:443",
  headers = { "signoz-ingestion-key" = "<your_ingestion_key>" }
}}
  • Set the <region> to match your SigNoz Cloud region
  • Replace <your_ingestion_key> with your SigNoz ingestion key
Info

Using self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in Cloud → Self-Hosted.

View Traces and Logs in SigNoz

Your Codex usage should now automatically emit traces and logs to SigNoz.

You should be able to view traces in SigNoz Cloud under the traces tab:

Codex Trace View
Codex Trace View

When you click on a trace in SigNoz, you'll see a detailed view of the trace, including all associated spans, along with their events and attributes.

Codex Detailed Trace View
Codex Detailed Trace View

You should be able to view logs in SigNoz Cloud under the logs tab:

Codex Logs View
Codex Logs View

When you click on any of these logs in SigNoz, you'll see a detailed view of the log, including attributes:

Codex Detailed Log View
Codex Detailed Logs View

Troubleshooting

If you don't see your telemetry data:

  1. Verify network connectivity - Ensure your application can reach SigNoz Cloud endpoints
  2. Check ingestion key - Verify your SigNoz ingestion key is correct
  3. Wait for data - OpenTelemetry batches data before sending, so wait 10-30 seconds after making API calls
  4. Try a console exporter — Enable a console exporter locally to confirm that your application is generating telemetry data before it’s sent to SigNoz

Next Steps

You can also check out our custom Codex dashboard here which provides specialized visualizations for monitoring your Codex usage in applications. The dashboard includes pre-built charts specifically tailored for LLM usage, along with import instructions to get started quickly.

Codex Dashboard
Codex Dashboard Template

Setup OpenTelemetry Collector (Optional)

What is the OpenTelemetry Collector?

Think of the OTel Collector as a middleman between your app and SigNoz. Instead of your application sending data directly to SigNoz, it sends everything to the Collector first, which then forwards it along.

Why use it?

  • Cleaning up data — Filter out noisy traces you don't care about, or remove sensitive info before it leaves your servers.
  • Keeping your app lightweight — Let the Collector handle batching, retries, and compression instead of your application code.
  • Adding context automatically — The Collector can tag your data with useful info like which Kubernetes pod or cloud region it came from.
  • Future flexibility — Want to send data to multiple backends later? The Collector makes that easy without changing your app.

See Switch from direct export to Collector for step-by-step instructions to convert your setup.

For more details, see Why use the OpenTelemetry Collector? and the Collector configuration guide.

Additional resources:

Last updated: January 23, 2026

Edit on GitHub

Was this page helpful?