wu-sheng opened a new pull request, #13791:
URL: https://github.com/apache/skywalking/pull/13791
### Support MCP (Model Context Protocol) observability for Envoy AI Gateway
- [x] If this is non-trivial feature, paste the links/URLs to the design doc.
- Extends
[SWIP-10](https://github.com/apache/skywalking/blob/master/docs/en/swip/SWIP-10/SWIP.md)
per [review
comment](https://github.com/apache/skywalking/pull/13757#discussion_r3000176157)
requesting MCP metrics support.
- MCP metrics defined in [envoyproxy/ai-gateway
mcp_metrics.go](https://github.com/envoyproxy/ai-gateway/blob/98200a4c0b06b4faa1750c0064b3b0506f0bfc15/internal/metrics/mcp_metrics.go#L23-L57).
- [x] Update the documentation to include this new feature.
- [x] Tests(including UT, IT, E2E) are added to verify the new feature.
- [ ] If it's UI related, attach the screenshots below.
#### 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 metrics
**LAL rules** (modified `envoy-ai-gateway.yaml`):
- Split into two rules: `envoy-ai-gateway-llm-access-log` and
`envoy-ai-gateway-mcp-access-log`
- LLM logs: persist error responses (>= 400) and upstream failures only
- MCP logs: persist error responses (>= 400) only
- Both rules tag `ai_route_type` (`llm` or `mcp`) for searchable filtering
**Dashboard** (modified service + instance JSON):
- Added **MCP** tab with 9 widgets (service) / 6 widgets (instance): request
CPM, latency avg/percentile, error CPM, method CPM, initialization latency,
backend breakdown
**E2E test** (modified):
- Added `mcp-server` service (`tzolov/mcp-everything-server:v3` — MCP
reference server with StreamableHttp)
- Added MCP request steps (initialize + tools/list + tools/call)
- Added MCP metric verification cases
- Log query uses `ai_route_type=llm` tag filter
**Config**:
- Added `ai_route_type` to `searchableLogsTags` in `application.yml`
- Fixed aigw healthcheck binary path (`/app` instead of `aigw`)
- [ ] If this pull request closes/resolves/fixes an existing issue, replace
the issue number. Closes #<issue number>.
- [x] Update the [`CHANGES`
log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]