Support MCP observability for Envoy AI Gateway#13791
Support MCP observability for Envoy AI Gateway#13791
Conversation
There was a problem hiding this comment.
Pull request overview
Adds MCP (Model Context Protocol) observability support for Envoy AI Gateway in SkyWalking, extending the existing Envoy AI Gateway (SWIP-10) integration with MCP metrics, dashboards, log tagging/sampling, and E2E verification.
Changes:
- Add new MAL rules to derive MCP service/instance metrics (aggregate, per-method, per-backend, init latency, capabilities).
- Split LAL into LLM vs MCP log rules and tag logs with
ai_route_typefor filtering; update default searchable log tags. - Extend dashboards + docs + E2E docker-compose scenario to include an MCP backend and MCP metric verification.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e-v2/cases/envoy-ai-gateway/expected/logs.yml | Updates expected log tags to include ai_route_type=llm. |
| test/e2e-v2/cases/envoy-ai-gateway/envoy-ai-gateway-cases.yaml | Adds MCP metric query cases; filters log query by ai_route_type=llm. |
| test/e2e-v2/cases/envoy-ai-gateway/e2e.yaml | Adds MCP request steps (initialize/tools) for metric verification. |
| test/e2e-v2/cases/envoy-ai-gateway/docker-compose.yml | Adds mcp-server service and configures ai-gateway-cli MCP routing; fixes healthcheck path. |
| oap-server/server-starter/src/main/resources/ui-initialized-templates/envoy_ai_gateway/envoy-ai-gateway-service.json | Adds “MCP” tab/widgets to the service dashboard template. |
| oap-server/server-starter/src/main/resources/ui-initialized-templates/envoy_ai_gateway/envoy-ai-gateway-instance.json | Adds “MCP” tab/widgets to the instance dashboard template. |
| oap-server/server-starter/src/main/resources/otel-rules/envoy-ai-gateway/gateway-mcp-service.yaml | New MAL rules for MCP service-level metrics. |
| oap-server/server-starter/src/main/resources/otel-rules/envoy-ai-gateway/gateway-mcp-instance.yaml | New MAL rules for MCP instance-level metrics. |
| oap-server/server-starter/src/main/resources/lal/envoy-ai-gateway.yaml | Splits access-log processing into LLM vs MCP rules; adds ai_route_type. |
| oap-server/server-starter/src/main/resources/application.yml | Adds ai_route_type to default searchableLogsTags. |
| docs/en/setup/backend/backend-envoy-ai-gateway-monitoring.md | Documents MCP metrics, dashboards, and log filtering/sampling behavior. |
| docs/en/changes/changes.md | Adds a CHANGES entry for MCP observability support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rver/server-starter/src/main/resources/otel-rules/envoy-ai-gateway/gateway-mcp-instance.yaml
Outdated
Show resolved
Hide resolved
oap-server/server-starter/src/main/resources/lal/envoy-ai-gateway.yaml
Outdated
Show resolved
Hide resolved
oap-server/server-starter/src/main/resources/lal/envoy-ai-gateway.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "type": "Line", | ||
| "showXAxis": true, | ||
| "showYAxis": true |
There was a problem hiding this comment.
@peachisai I updated this part, as the Bar seems not correct visualization for percentile.
Support MCP (Model Context Protocol) observability for Envoy AI Gateway
Changes
MAL rules (new files):
gateway-mcp-service.yaml— 13 MCP service-level metrics (request CPM/latency/percentile, method CPM, error CPM, initialization latency, capabilities, per-backend breakdown)gateway-mcp-instance.yaml— 13 MCP instance-level metricsLAL rules (modified
envoy-ai-gateway.yaml):envoy-ai-gateway-llm-access-logandenvoy-ai-gateway-mcp-access-logai_route_type(llmormcp) for searchable filteringDashboard (modified service + instance JSON):
E2E test (modified):
mcp-serverservice (tzolov/mcp-everything-server:v3— MCP reference server with StreamableHttp)ai_route_type=llmtag filterConfig:
Added
ai_route_typetosearchableLogsTagsinapplication.ymlFixed aigw healthcheck binary path (
/appinstead ofaigw)If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGESlog.