Align OpenTelemetry endpoint validation with MCP Gateway spec 1.16.0 (HTTP or HTTPS) - #11588
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Aligns OpenTelemetry endpoint handling with MCP Gateway spec 1.16.0.
Changes:
- Allows HTTP and HTTPS OTLP endpoints.
- Updates schema and compliance coverage.
- Reports spec version 1.16.0.
Show a summary per file
| File | Description |
|---|---|
internal/server/unified.go |
Bumps reported spec version. |
internal/config/validation_tracing.go |
Relaxes endpoint scheme validation. |
internal/config/validation_schema_test.go |
Tests schema HTTP acceptance. |
internal/config/validation_otel_test.go |
Tests runtime validation branches. |
internal/config/validation_gateway_coverage_test.go |
Covers gateway-level validation. |
internal/config/schema/mcp-gateway-config.schema.json |
Allows HTTP or HTTPS endpoints. |
internal/config/config_tracing.go |
Updates specification references. |
internal/config/config_tracing_test.go |
Updates compliance test semantics. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Balanced
| // validateOpenTelemetryConfig validates OpenTelemetry configuration per spec §4.1.3.7. | ||
| // When enforceHTTPS is true (i.e. the config came from the opentelemetry section), | ||
| // the endpoint is required and MUST use HTTPS. | ||
| // the endpoint is required and MUST use HTTP or HTTPS. |
🔒 mcpg Read-Only Stress — docker-sbxSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
No writes leaked. No issues, comments, branches, files, or PRs were created. References: §32430966141
|
🔒 mcpg Read-Only Stress — default AWFSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE
Methodology gap: Gateway-level DIFC write enforcement for MCP tools can only be confirmed by a probe that launches the GitHub MCP server outside gh-aw's References: §32430966179
|
Spec 1.16.0 allows
gateway.opentelemetry.endpointto use either HTTP or HTTPS, but the gateway still enforced HTTPS-only in both runtime validation and schema. This updates validation, schema, and compliance tests to match the new requirement, and bumps the reported spec version.Validation logic (runtime)
validateOpenTelemetryConfignow acceptshttp://andhttps://endpoints whengateway.opentelemetryis present.Config schema (contract)
opentelemetry.endpointpattern from HTTPS-only to HTTP-or-HTTPS:^(https?://.+|\\$\\{[A-Z_][A-Z0-9_]*\\})$Compliance/test semantics
T-OTEL-002/T-OTEL-004) to reflect:http://127.0.0.1:4318/...acceptedgrpc://...rejectedReported spec version
MCPGatewaySpecVersionfrom1.15.0to1.16.0.