{"slug": "openai-codex-observability-monitoring-with-opentelemetry", "title": "OpenAI Codex Observability & Monitoring with OpenTelemetry", "summary": "OpenAI Codex users can now monitor their AI coding assistant's performance by integrating OpenTelemetry with SigNoz, enabling the export of traces and logs for observability. The setup requires a SigNoz cloud account or self-hosted instance, a ChatGPT subscription or OpenAI API key, and configuration changes to Codex's config.toml file to enable OTLP export. This integration allows developers to track metrics and debug Codex usage through detailed trace and log views in SigNoz.", "body_md": "Overview\n\n[OpenAI Codex](https://developers.openai.com/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.\n\nThis guide walks you through setting up observability and monitoring for OpenAI Codex using [OpenTelemetry](https://opentelemetry.io/) and exporting traces and logs to SigNoz. With this integration, you can observe and track various metrics for your Codex AI coding assistant usage.\n\nPrerequisites\n\n- A\n[SigNoz Cloud account](https://signoz.io/teams/)with an active ingestion key or[Self Hosted SigNoz instance](https://signoz.io/docs/install/self-host/) - ChatGPT Plus, Pro, Business, Edu, or Enterprise subscription,\n**or** an OpenAI API key (obtainable from the[OpenAI Platform](https://platform.openai.com/api-keys)) - Internet access to send telemetry data to SigNoz and make API calls to OpenAI\n\nMonitoring Codex\n\nStep 1: Set up Codex\n\nFor more information on getting started with Codex in your environment, refer to the [Codex quickstart guide](https://developers.openai.com/codex/quickstart/).\n\nInstall the Codex extension for your IDE:\n\n[Download for Visual Studio Code](vscode:extension/openai.chatgpt)[Download for Cursor](cursor:extension/openai.chatgpt)[Download for Windsurf](windsurf:extension/openai.chatgpt)[Download for Visual Studio Code Insiders](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt)\n\nOnce 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.\n\nSign in with your ChatGPT account or API key to get started.\n\nCodex starts in Agent mode by default, which lets it read files, run commands, and write changes in your project directory.\n\nCodex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.\n\nThe Codex CLI is supported on macOS, Windows, and Linux.\n\nInstall with your preferred package manager:\n\nInstall with npm:\n\n```\nnpm install -g @openai/codex\n```\n\nInstall with Homebrew:\n\n```\nbrew install codex\n```\n\nRun codex in your terminal to get started. You’ll be prompted to sign in with your ChatGPT account or an API key.\n\nOnce authenticated, you can ask Codex to perform tasks in the current directory.\n\nCodex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.\n\nStep 2: Enable OpenTelemetry (OTel) export to track Codex runs\n\nFor more information on setting up telemetry for Codex, refer to the [Codex observability guide](https://developers.openai.com/codex/config-advanced#observability-and-telemetry).\n\nCodex stores its configuration at `~/.codex/config.toml`\n\n.\n\nAppend the following to `~/.codex/config.toml`\n\n:\n\n```\n[otel]\nlog_user_prompt = true\nexporter = { otlp-grpc = {\n  endpoint = \"https://ingest.<region>.signoz.cloud:443\",\n  headers = { \"signoz-ingestion-key\" = \"<your-ingestion-key>\" }\n}}\n```\n\n`<region>`\n\n: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)`<your-ingestion-key>`\n\n: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/)\n\nUsing 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](https://signoz.io/docs/ingestion/cloud-vs-self-hosted/#cloud-to-self-hosted).\n\nView Traces and Logs in SigNoz\n\nYour Codex usage should now automatically emit traces and logs to SigNoz.\n\nYou should be able to view traces in SigNoz Cloud under the traces tab:\n\nWhen 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.\n\nYou should be able to view logs in SigNoz Cloud under the logs tab:\n\nWhen you click on any of these logs in SigNoz, you'll see a detailed view of the log, including attributes:\n\nTroubleshooting\n\n[Troubleshooting](#troubleshooting)\n\nIf you don't see your telemetry data:\n\n**Verify network connectivity**- Ensure your application can reach SigNoz Cloud endpoints** Check ingestion key**- Verify your SigNoz ingestion key is correct** Wait for data**- OpenTelemetry batches data before sending, so wait 10-30 seconds after making API calls** Try a console exporter**— Enable a console exporter locally to confirm that your application is generating telemetry data before it’s sent to SigNoz\n\nNext Steps\n\nYou can also check out our custom Codex dashboard [here](https://signoz.io/docs/dashboards/dashboard-templates/codex-dashboard/) 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.\n\nSetup OpenTelemetry Collector (Optional)\n\n[Setup OpenTelemetry Collector (Optional)](#setup-opentelemetry-collector-optional)\n\nWhat is the OpenTelemetry Collector?\n\nThink 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.\n\nWhy use it?\n\n**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.\n\nSee [Switch from direct export to Collector](https://signoz.io/docs/opentelemetry-collection-agents/opentelemetry-collector/switch-to-collector/) for step-by-step instructions to convert your setup.\n\nFor more details, see [Why use the OpenTelemetry Collector?](https://signoz.io/docs/opentelemetry-collection-agents/opentelemetry-collector/why-to-use-collector/) and the [Collector configuration guide](https://signoz.io/docs/opentelemetry-collection-agents/opentelemetry-collector/configuration/).\n\nAdditional resources:\n\n- Set up\n[alerts](https://signoz.io/docs/alerts/)for high latency or error rates - Learn more about\n[querying traces](https://signoz.io/docs/userguide/traces/) - Explore\n[log correlation](https://signoz.io/docs/userguide/logs_query_builder/)", "url": "https://wpnews.pro/news/openai-codex-observability-monitoring-with-opentelemetry", "canonical_source": "https://signoz.io/docs/codex-monitoring", "published_at": "2026-06-09 00:00:00+00:00", "updated_at": "2026-06-11 17:59:53.889170+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "ai-infrastructure", "mlops", "large-language-models"], "entities": ["OpenAI Codex", "OpenTelemetry", "SigNoz", "OpenAI", "Visual Studio Code", "Cursor", "Windsurf"], "alternates": {"html": "https://wpnews.pro/news/openai-codex-observability-monitoring-with-opentelemetry", "markdown": "https://wpnews.pro/news/openai-codex-observability-monitoring-with-opentelemetry.md", "text": "https://wpnews.pro/news/openai-codex-observability-monitoring-with-opentelemetry.txt", "jsonld": "https://wpnews.pro/news/openai-codex-observability-monitoring-with-opentelemetry.jsonld"}}