
Chris CoutinhoandClaude
c4bf077050
feat: Add OpenTelemetry tracing to @instrument_tool decorator
Enhances the @instrument_tool decorator to create distributed traces
for all MCP tool executions, improving observability and debugging.
Changes:
- Modified @instrument_tool to wrap tool execution in trace_operation
- Added automatic span creation with mcp.tool.* span names
- Sanitized tool arguments before adding to span attributes
(excludes password, token, secret, api_key, etag, ctx)
- Limited argument strings to 500 characters to prevent huge spans
- Maintained existing Prometheus metrics functionality
- Updated docs/observability.md to reflect correct decorator name
- Added comprehensive unit tests
All ~50+ MCP tools now emit traces automatically without code changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 11:16:05 +01:00
..
2025-11-15 06:21:06 +01:00
2025-11-11 20:35:08 +01:00
2025-11-13 21:57:14 +01:00
2025-11-05 15:19:55 +01:00
2025-11-12 02:46:30 +01:00
2025-11-09 05:53:53 +01:00
2025-11-16 11:16:05 +01:00
2025-11-15 06:48:58 +01:00
2025-11-15 06:21:06 +01:00
2025-10-25 19:52:45 +02:00
2025-11-15 02:02:57 +01:00
2025-05-04 23:24:55 +02:00
2025-11-15 02:32:10 +01:00
2025-11-11 20:35:08 +01:00
2025-11-13 21:48:58 +01:00
2025-11-05 21:44:04 +01:00