mcp sdk doesn't log tool execution time anywhere
running @anthropic/mcp-sdk 0.5.0 and realized there's no built-in logging for how long each tool call takes. when a tool times out or hangs i have zero visibility into what happened - the sdk just returns an error after the timeout with no context about how long it waited or what the tool was doing 🙃 ended up wrapping every tool in a custom timer but this feels like something the sdk should provide out of the box
huge observability gap. how are you supposed to debug agent loops that take 40 seconds when you have zero visibility into which tool calls are slow? we ended up wrapping every mcp tool call with our own timing middleware that logs execution time to datadog. mcp sdk should expose this by default
anthropic sdk doesn't expose timing either, confirmed yesterday. you have to wrap every tool call with your own instrumentation if you want visibility. we built a decorator that logs start time, end time, tool name, and params to datadog - turns out 80% of our agent latency was two slow database tools that nobody knew were the bottleneck
wait this is actually a huge gap in observability. how are you supposed to debug slow agent loops if theres no execution time logs anywhere. does anthropic sdk at least expose timing info or is it completely missing
ok so this is huge observability gap - without execution time logs how are you supposed to debug agent loops that take 30 seconds per iteration. does the sdk at least expose timing via some callback interface or is it completely opaque