feat(mcpg): upgrade MCP Gateway to v0.2.14, add OpenTelemetry OTLP tracing support#24664
feat(mcpg): upgrade MCP Gateway to v0.2.14, add OpenTelemetry OTLP tracing support#24664
Conversation
…upport (spec §4.1.3.6) Agent-Logs-Url: https://github.com/github/gh-aw/sessions/63debe45-29fd-48aa-92a0-a6c98ffe7009 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot the opentelenetry info is taken from observability.optl. |
…, not sandbox.mcp Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f27931bc-7328-4d7e-8d7e-e7db9f9844aa Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f27931bc-7328-4d7e-8d7e-e7db9f9844aa Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 978c402. The gateway's Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot the traceid and spanid need to be passed as well |
|
@copilot headers typically come from an expression and cannot be parsed in go. They are passed in the config as is |
…OTLP config Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1e4c132e-2940-4bec-ba82-364d806f3db0 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 53e94cb. Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Bumps the default MCP Gateway (
gh-aw-mcpg) fromv0.2.12→v0.2.14and wires the gateway's optional OpenTelemetry OTLP tracing configuration from the existingobservability.otlpfrontmatter section, enabling distributed tracing of MCP tool calls via OTLP/HTTP per spec §4.1.3.6 (v1.11.0).Version bump
DefaultMCPGatewayVersion:v0.2.12→v0.2.14OpenTelemetry config (via
observability.otlp)When
observability.otlp.endpointis configured, the gateway automatically receives anopentelemetrysection in its JSON config. No new frontmatter field is needed — the existing OTLP configuration is reused:This produces the following in the gateway's JSON config:
Static endpoint hostnames are automatically added to the AWF firewall allowlist (already handled by the existing
injectOTLPConfig). GitHub Actions expressions inheadersare skipped at compile time.Implementation
frontmatter_types.go:OTLPConfigextended withTraceIDandSpanIDfieldsobservability_otlp.go:extractOTLPConfigFromRawnow also readstraceIdandspanIdfrom the raw frontmatter maptools_types.go:GatewayOpenTelemetryConfigstruct;OpenTelemetryfield onMCPGatewayRuntimeConfigmcp_gateway_config.go:buildGatewayOTLPFromObservabilityreads endpoint, headers,traceId, andspanIdfromobservability.otlp;parseOTLPHeadersStringconverts the comma-separatedkey=valueheaders string into the map the gateway JSON expects (trims whitespace from keys and values; skips expressions)mcp_renderer.go: rendersopentelemetryJSON block in thegatewayconfig section with deterministically sorted headers,traceId, andspanId