Skip to content

docs: fix unsupported headers in JSON stdin OpenTelemetry example, clarify MCP_GATEWAY_PORT behavior - #8564

Merged
lpcox merged 2 commits into
mainfrom
copilot/fix-json-stdin-example-headers
Jul 3, 2026
Merged

docs: fix unsupported headers in JSON stdin OpenTelemetry example, clarify MCP_GATEWAY_PORT behavior#8564
lpcox merged 2 commits into
mainfrom
copilot/fix-json-stdin-example-headers

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Two documentation inaccuracies that cause user-facing failures or confusion:

  1. The JSON stdin gateway.opentelemetry example included a headers field that the schema explicitly rejects (additionalProperties: false in opentelemetryConfig, no headers field in StdinOpenTelemetryConfig). Users following this example will get a validation error and a broken gateway startup.

  2. The README implied awmg reads MCP_GATEWAY_PORT to set its listen address — it doesn't. Only run.sh/run_containerized.sh use it to construct the --listen flag.

Changes

  • docs/CONFIGURATION.md

    • Annotate headers as TOML only in the OpenTelemetry field table (consistent with sample_rate)
    • Remove "headers" from the JSON stdin example block:
      // before
      {
        "gateway": {
          "opentelemetry": {
            "spanId": "00f067aa0ba902b7",
            "headers": "Authorization=******"  // ❌ not supported
          }
        }
      }
      
      // after — headers line removed; note added directing to OTEL_EXPORTER_OTLP_HEADERS
    • Add a blockquote note after the example pointing to OTEL_EXPORTER_OTLP_HEADERS as the correct mechanism
  • README.md

    • Reword the port field description to accurately state that MCP_GATEWAY_PORT is consumed by wrapper scripts, not by awmg directly; --listen is the right flag

Copilot AI linked an issue Jul 3, 2026 that may be closed by this pull request
…etry example and clarify MCP_GATEWAY_PORT usage
Copilot AI changed the title [WIP] Fix unsupported headers field in JSON stdin example docs: fix unsupported headers in JSON stdin OpenTelemetry example, clarify MCP_GATEWAY_PORT behavior Jul 3, 2026
Copilot AI requested a review from lpcox July 3, 2026 12:34
Copilot finished work on behalf of lpcox July 3, 2026 12:34
@lpcox
lpcox marked this pull request as ready for review July 3, 2026 12:43
Copilot AI review requested due to automatic review settings July 3, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects two documentation inaccuracies around OpenTelemetry JSON stdin configuration and how the gateway’s listen port is set, aiming to prevent validation errors and reduce user confusion when configuring/running awmg.

Changes:

  • Clarifies that gateway.opentelemetry.headers is not supported in JSON stdin and removes it from the JSON stdin example in docs/CONFIGURATION.md, pointing users to OTEL_EXPORTER_OTLP_HEADERS instead.
  • Rewords the README’s port field description to better explain that --listen controls the bind address and that wrapper scripts construct it from env vars.
Show a summary per file
File Description
README.md Updates the port field documentation to clarify how the listen address is set.
docs/CONFIGURATION.md Fixes the OpenTelemetry JSON stdin example and labels headers as TOML-only, adding guidance for JSON stdin users.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment thread README.md
| `agent_id` / `agentId` | Agent/session identifier used for routing and optional auth matching |
| `api_key` / `apiKey` | Deprecated alias for `agent_id` / `agentId` (accepted with warnings) |
| `port` | Metadata only; validated (1–65535) but does not control the listen address. Use the `--listen` flag or `MCP_GATEWAY_PORT` env var (containerized) to set the actual listen port. |
| `port` | Metadata only; validated (1–65535) but does not control the listen address. Use the `--listen` flag to set the listen address; `MCP_GATEWAY_PORT` is used by `run.sh`/`run_containerized.sh` to build the `--listen` argument, not read directly by `awmg`. |
@lpcox
lpcox merged commit 5d394f6 into main Jul 3, 2026
33 checks passed
@lpcox
lpcox deleted the copilot/fix-json-stdin-example-headers branch July 3, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📚 Documentation Reconciliation Report - 2026-07-02

3 participants