Grafana Cloud

OpenAI Codex integration for Grafana Cloud

Track OpenAI Codex CLI usage, API requests, tool invocations, and performance metrics across your organization by exporting telemetry data through OpenTelemetry (OTel). Codex exports metrics, logs, and traces.

Install OpenAI Codex integration for Grafana Cloud

  1. In your Grafana Cloud stack, click Connections in the left-hand menu.
  2. Find and select the OpenAI Codex tile to open the integration.
  3. Follow the steps outlined on the Configuration page to set up telemetry and configure credentials.
  4. Once configuration is complete, click Install to add the prebuilt dashboards to your Grafana Cloud instance.

Configuration

The OpenAI Codex integration sends metrics, logs, and traces to Grafana Cloud via OpenTelemetry (OTLP HTTP), configured through ~/.codex/config.toml.

Configure the integration

Follow these steps to set up OpenAI Codex for Grafana Cloud:

  1. Create Grafana Cloud Token

    • Generate a Grafana Cloud Access Policy Token with metrics:write, logs:write, and traces:write permissions.
    • Copy the token value and store it securely.
  2. Configure ~/.codex/config.toml

    Create or edit ~/.codex/config.toml and add the following, replacing the placeholder values with your Grafana Cloud credentials:

    toml
    [otel]
    environment = "production"
    log_user_prompt = false
    exporter = { otlp-http = {
      endpoint = "<your-grafana-cloud-otlp-endpoint>/otlp/v1/logs",
      protocol = "binary",
      headers = { "Authorization" = "Basic <base64-encoded-instanceid:token>" }
    }}
    metrics_exporter = { otlp-http = {
      endpoint = "<your-grafana-cloud-otlp-endpoint>/otlp/v1/metrics",
      protocol = "binary",
      headers = { "Authorization" = "Basic <base64-encoded-instanceid:token>" }
    }}
    trace_exporter = { otlp-http = {
      endpoint = "<your-grafana-cloud-otlp-endpoint>/otlp/v1/traces",
      protocol = "binary",
      headers = { "Authorization" = "Basic <base64-encoded-instanceid:token>" }
    }}

    Restart Codex after saving the file for changes to take effect. It may take a few minutes for data to appear in Grafana Cloud.

  3. Install Dashboards

    • Click Install to add the OpenAI Codex dashboards to your Grafana Cloud instance.

Finding your credentials

  • OTLP Endpoint: Your endpoint is displayed in the integration configuration page. You can also find it in the Grafana Cloud portal under My Account → Stack details.
  • Auth Header: Use Basic <base64(instanceId:token)> where instanceId is your OpenTelemetry instance ID and token is the Grafana Cloud Access Policy token generated above.

Dashboards

The OpenAI Codex integration installs the following dashboards in your Grafana Cloud instance.

  • OpenAI Codex

OpenAI Codex overview

image

OpenAI Codex usage

image

OpenAI Codex performance

image

Changelog

md
# 1.0.0 - March 2026

* Initial release of OpenAI Codex integration