feat: add smoke-otel-tracing workflow for OTel/OTLP/Sentry validation - #4626
Merged
Conversation
Weekly smoke test that validates the MCP Gateway's OpenTelemetry tracing: - Provider initialization (noop vs SDK, sampler selection) - W3C parent context propagation (traceId/spanId resolution) - HTTP handler span creation (WrapHTTPHandler) - Tool call span instrumentation (unified mode callBackendTool) - OTLP header parsing (comma-separated key=value format) - HTTP backend auth (Sentry-pattern env var expansion) - Graceful shutdown with span flush - Binary integration with stdin JSON OTel config Motivated by investigation of gh-aw action run #24940914427 which revealed that MCPG tracing initializes correctly but spans may not link to the parent trace, and routed mode lacks tool-level spans. Documents known gaps (routed mode instrumentation, parent trace linkage, schema URL conflict) so the agent doesn't file false issues. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new weekly Agentic Workflow smoke test to validate MCP Gateway OpenTelemetry tracing behavior (provider init, context propagation, HTTP/tool spans, and related auth/shutdown scenarios) to catch regressions seen in recent investigations.
Changes:
- Added a new
smoke-otel-tracingworkflow definition in gh-aw markdown format with 8 tracing validation scenarios. - Added the compiled
.lock.ymlworkflow artifact for deterministic execution in GitHub Actions.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/smoke-otel-tracing.md |
Defines the weekly smoke workflow prompt/runbook and safe-outputs settings for OTel tracing validation. |
.github/workflows/smoke-otel-tracing.lock.yml |
Compiled workflow used by GitHub Actions to execute the smoke test. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 4
| Verify that `internal/tracing/` correctly initializes the OTLP provider: | ||
|
|
||
| ```bash | ||
| cd /Users/lpcox/Desktop/ai/gh-aw-mcpg |
Comment on lines
+121
to
+128
| ### Scenario 4: Tool Call Span Instrumentation (Unified Mode) | ||
|
|
||
| Verify that `callBackendTool` in `internal/server/unified.go` creates `mcp.tool_call` and | ||
| `gateway.backend.execute` spans with the correct attributes: | ||
|
|
||
| ```bash | ||
| go test -v -run 'TestCallBackend|TestToolCall|TestCircuitBreaker' ./internal/server/ 2>&1 | ||
| ``` |
| object form from #28524): | ||
|
|
||
| ```bash | ||
| go test -v -run 'TestParseHeaders' ./internal/tracing/ 2>&1 |
Comment on lines
+436
to
+437
| - name: Download container images | ||
| run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.25.28@sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28@sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb ghcr.io/github/gh-aw-firewall/squid:0.25.28@sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474 ghcr.io/github/gh-aw-mcpg:v0.3.0 ghcr.io/github/github-mcp-server:v1.0.2 node:lts-alpine@sha256:01743339035a5c3c11a373cd7c83aeab6ed1457b55da6a69e014a95ac4e4700b |
This was referenced Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a weekly smoke test workflow (
smoke-otel-tracing.md) that validates the MCP Gateway's OpenTelemetry tracing across 8 scenarios.Motivation
Investigation of gh-aw action run #24940914427 revealed:
mcp.tool_callonly exists in unified mode)SENTRY_API_KEY(#28517)Recent gh-aw OTel changes that affect MCPG:
observability.otlp.headersnow supports object form — MCPG receives the normalized stringgen_ai.*semantic conventions — emitted by JS layer, MCPG spans should be siblings in same traceTest Scenarios
WrapHTTPHandlercreatesgateway.requestspanscallBackendToolcreatesmcp.tool_callspans (unified)Provider.Shutdownflushes buffered spansawmgaccepts OTel config via stdin JSONKnown Gaps (documented, not filed as issues)
traceparentrequest headersVerification
make agent-finished✅ — all checks passgh aw compile smoke-otel-tracing✅ — compiles cleanly