Skip to content

Conversation

@448523760
Copy link
Contributor

…alid (#7668)

The otel exporter example in docs/config.md is misleading and will cause
the configuration parser to fail if copied verbatim.

Summary

The example uses a TOML inline table but spreads the inline-table braces
across multiple lines. TOML inline tables must be contained on a single line
(key = { a = 1, b = 2 }); placing newlines inside the braces triggers a
parse error in most TOML parsers and prevents Codex from starting.

Reproduction

  1. Paste the snippet below into ~/.codex/config.toml (or your project config).
  2. Run codex (or the command that loads the config).
  3. The process will fail to start with a TOML parse error similar to:
Error loading config.toml: TOML parse error at line 55, column 27
   |
55 | exporter = { otlp-http = {
   |                           ^
newlines are unsupported in inline tables, expected nothing

Problematic snippet (as currently shown in the docs)

[otel]
exporter = { otlp-http = {
  endpoint = "https://otel.example.com/v1/logs",
  protocol = "binary",
  headers = { "x-otlp-api-key" = "${OTLP_TOKEN}" }
}}

Recommended fixes

[otel.exporter."otlp-http"]
endpoint = "https://otel.example.com/v1/logs"
protocol = "binary"

[otel.exporter."otlp-http".headers]
"x-otlp-api-key" = "${OTLP_TOKEN}"

Or, keep an inline table but write it on one line (valid but less readable):

[otel]
exporter = { "otlp-http" = { endpoint = "https://otel.example.com/v1/logs", protocol = "binary", headers = { "x-otlp-api-key" = "${OTLP_TOKEN}" } } }

@448523760 448523760 marked this pull request as draft December 6, 2025 16:16
@etraut-openai
Copy link
Collaborator

Thanks for the contribution. Once this is ready for review, please take it out of draft mode.

@etraut-openai etraut-openai added the needs-response Additional information is requested label Dec 6, 2025
@448523760 448523760 marked this pull request as ready for review December 7, 2025 02:26
@etraut-openai etraut-openai removed the needs-response Additional information is requested label Dec 7, 2025
@etraut-openai
Copy link
Collaborator

Thanks for the contribution!

@etraut-openai etraut-openai merged commit 57ba9fa into openai:main Dec 8, 2025
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants