Skip to content

feat: extend MCP gateway specification with optional OpenTelemetry configuration (v1.11.0)#24602

Merged
pelikhan merged 2 commits intomainfrom
copilot/extend-mcp-gateway-specification
Apr 4, 2026
Merged

feat: extend MCP gateway specification with optional OpenTelemetry configuration (v1.11.0)#24602
pelikhan merged 2 commits intomainfrom
copilot/extend-mcp-gateway-specification

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

Summary

Extends the MCP Gateway Specification from v1.10.0 to v1.11.0 by adding an optional opentelemetry configuration object to the gateway configuration section. When configured, the gateway emits distributed tracing spans for each MCP tool invocation using the OpenTelemetry OTLP/HTTP protocol.

Changes

Specification (docs/src/content/docs/reference/mcp-gateway.md)

  • New Section 4.1.3.6 — OpenTelemetry Configuration with the following fields:
    • endpoint (required when object is present): HTTPS OTLP/HTTP collector URL
    • headers: Additional HTTP headers for each export request (e.g., Authorization)
    • traceId: Parent trace ID (32-char lowercase hex) for W3C trace context propagation
    • spanId: Parent span ID (16-char lowercase hex) for W3C trace context propagation
    • serviceName: Logical service name in service.name resource attribute (default: "mcp-gateway")
  • Section 4.1.3 — Added opentelemetry row to gateway configuration fields table
  • Section 10.1.10 — New compliance test category with T-OTEL-001 through T-OTEL-010
  • Section 10.2 — Updated compliance checklist (Level 3 / Optional)
  • Appendix A.6, A.7 — Example configurations (basic OTel, with parent trace context)
  • References — Normative references for W3C Trace Context and OTLP/HTTP
  • Change Log — v1.11.0 entry
  • Version header updated to 1.11.0

JSON Schemas

Both schema files updated with the new opentelemetryConfig definition and opentelemetry reference in gatewayConfig:

  • docs/public/schemas/mcp-gateway-config.schema.json
  • pkg/workflow/schemas/mcp-gateway-config.schema.json

All fields include proper JSON Schema constraints (pattern, minLength, oneOf for variable expression support) and the binary was rebuilt to embed the updated schema.

Copilot AI and others added 2 commits April 4, 2026 22:25
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dcf74359-0413-4d0e-ad81-cf14cadb6e7d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…on (v1.11.0)

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/dcf74359-0413-4d0e-ad81-cf14cadb6e7d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan April 4, 2026 22:39
@pelikhan pelikhan marked this pull request as ready for review April 4, 2026 23:11
Copilot AI review requested due to automatic review settings April 4, 2026 23:11
@pelikhan pelikhan merged commit 5481aa3 into main Apr 4, 2026
51 of 52 checks passed
@pelikhan pelikhan deleted the copilot/extend-mcp-gateway-specification branch April 4, 2026 23:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Extends the MCP Gateway spec/config schema to support optional OpenTelemetry tracing configuration (v1.11.0), and updates a couple of Copilot workflows to propagate an OTLP trace ID through the shared ./actions/setup step.

Changes:

  • Add gateway.opentelemetry to the MCP gateway config JSON Schemas with validation constraints.
  • Update the MCP Gateway Specification doc to v1.11.0 with a new OpenTelemetry configuration section, examples, and compliance tests.
  • Update Copilot token workflows to emit/propagate a shared trace ID across jobs via ./actions/setup.
Show a summary per file
File Description
pkg/workflow/schemas/mcp-gateway-config.schema.json Adds opentelemetryConfig definition and gateway.opentelemetry reference.
docs/public/schemas/mcp-gateway-config.schema.json Mirrors the schema change for published documentation assets.
docs/src/content/docs/reference/mcp-gateway.md Bumps spec to v1.11.0 and documents OpenTelemetry config, examples, and test matrix.
.github/workflows/copilot-token-optimizer.lock.yml Adds job-name + cross-job trace-id propagation for ./actions/setup.
.github/workflows/copilot-token-audit.lock.yml Adds job-name + cross-job trace-id propagation for ./actions/setup.

Copilot's findings

Tip

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

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

- `spanId` SHOULD only be set when `traceId` is also set; if `spanId` is provided without `traceId` the gateway SHOULD log a warning and ignore `spanId`
- Export failures MUST NOT propagate errors to MCP clients

**Compliance Test**: T-OTEL-001 through T-OTEL-009 (Section 10.1.10)
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The OpenTelemetry section’s compliance-test reference is off by one: it says "T-OTEL-001 through T-OTEL-009" but Section 10.1.10 defines tests through T-OTEL-010 (serviceName). Please update this reference to include T-OTEL-010 for consistency.

Suggested change
**Compliance Test**: T-OTEL-001 through T-OTEL-009 (Section 10.1.10)
**Compliance Test**: T-OTEL-001 through T-OTEL-010 (Section 10.1.10)

Copilot uses AI. Check for mistakes.
Comment on lines 72 to +91
outputs:
comment_id: ""
comment_repo: ""
lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
model: ${{ steps.generate_aw_info.outputs.model }}
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
steps:
- name: Checkout actions folder
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: github/gh-aw
sparse-checkout: |
actions
persist-credentials: false
- name: Setup Scripts
id: setup
uses: ./actions/setup
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This PR description focuses on the MCP Gateway spec/schema changes, but these workflow updates also add cross-job trace propagation (setup-trace-id / trace-id / job-name) for the ./actions/setup step. Please either mention this CI/workflow behavior change in the PR description or split it into a separate PR to keep the change scope clear.

Copilot uses AI. Check for mistakes.
Comment on lines 77 to 97
outputs:
comment_id: ""
comment_repo: ""
lockdown_check_failed: ${{ steps.generate_aw_info.outputs.lockdown_check_failed == 'true' }}
model: ${{ steps.generate_aw_info.outputs.model }}
setup-trace-id: ${{ steps.setup.outputs.trace-id }}
steps:
- name: Checkout actions folder
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: github/gh-aw
sparse-checkout: |
actions
persist-credentials: false
- name: Setup Scripts
id: setup
uses: ./actions/setup
with:
destination: ${{ runner.temp }}/gh-aw/actions
job-name: ${{ github.job }}
- name: Generate agentic run info
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

This workflow change introduces cross-job trace propagation for ./actions/setup (setup-trace-id / trace-id / job-name), but the PR description only discusses MCP Gateway spec/schema updates. Please call out this CI/workflow scope change in the PR description or move it to a separate PR.

Copilot uses AI. Check for mistakes.
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.

3 participants