
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-11 20:35:08 +01:00
2025-11-11 20:35:08 +01:00
2025-10-17 04:30:03 +02:00
2025-11-12 02:46:30 +01:00
2025-11-11 20:01:49 +01:00
2025-11-03 02:18:30 +01:00
2025-11-11 20:01:49 +01:00
2025-10-24 04:38:49 +02:00
2025-11-16 11:16:05 +01:00
2025-10-24 01:04:30 +02:00
2025-11-14 19:20:30 +01:00
2025-11-11 23:42:00 +01:00
2025-10-14 01:23:39 +02:00