Conversation
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>
There was a problem hiding this comment.
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.opentelemetryto 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) |
There was a problem hiding this comment.
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.
| **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) |
| 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 }} |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
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.
Summary
Extends the MCP Gateway Specification from v1.10.0 to v1.11.0 by adding an optional
opentelemetryconfiguration 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)endpoint(required when object is present): HTTPS OTLP/HTTP collector URLheaders: Additional HTTP headers for each export request (e.g.,Authorization)traceId: Parent trace ID (32-char lowercase hex) for W3C trace context propagationspanId: Parent span ID (16-char lowercase hex) for W3C trace context propagationserviceName: Logical service name inservice.nameresource attribute (default:"mcp-gateway")opentelemetryrow to gateway configuration fields tableJSON Schemas
Both schema files updated with the new
opentelemetryConfigdefinition andopentelemetryreference ingatewayConfig:docs/public/schemas/mcp-gateway-config.schema.jsonpkg/workflow/schemas/mcp-gateway-config.schema.jsonAll fields include proper JSON Schema constraints (
pattern,minLength,oneOffor variable expression support) and the binary was rebuilt to embed the updated schema.