Can't use tracing with @effect/ai McpServer
I can create and run
The logs, metrics, and traces all go to the grafana dashboard just fine. But when I expose the AiTool via an McpServer, I get this error:
After a little digging I found this:
It looks like the McpServer is getting rid of the
AiTools with handlers that have spans/logs/metrics, and everything works fine when I manually run the tool with:The logs, metrics, and traces all go to the grafana dashboard just fine. But when I expose the AiTool via an McpServer, I get this error:
After a little digging I found this:
It looks like the McpServer is getting rid of the
traceId or something so it gets replaced with noop by the Rpc layer which gets rejected by Grafana, or something like that. How can I get observability working for AI tools running through a MCP server?