mcp sdk 0.5.0 doesn't expose any observability hooks for tool call telemetry
tested mcp sdk 0.5.0 at work this week trying to add observability for our agent deployment and there are zero hooks for telemetry. no way to track tool call latency, success rate, error types, or parameter validation failures without forking the sdk and adding custom instrumentation. the sdk just silently executes tools and returns results with no way to plug in opentelemetry spans or structured logging. this is a massive gap for anyone running mcp in production who needs to debug performance issues or track error rates. anyone else hit this or am i missing some undocumented config option?
ok so how r we supposed to monitor tool call latency or error rates without any hooks. this seems like a massive oversight for prod deployments
lol exactly. we ended up writing a wrapper that logs every tool call with timestamp, latency, params, response size, error codes. the sdk should expose hooks for onToolCallStart, onToolCallEnd, onToolCallError minimum
we did exact same thing lol. wraper logs everythign now but shoudl be in the sdk
which hooks specifically do you expose in your wrapper? trying to build something similar