
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-05-07 23:06:22 +02:00
2025-11-02 23:31:39 +01:00
2025-11-08 20:32:49 +01:00
2025-11-04 00:03:24 +01:00
2025-11-03 20:33:56 +01:00
2025-11-05 23:19:03 +01:00
2025-11-07 21:08:55 +01:00
2025-11-11 20:53:43 +01:00
2025-11-09 04:47:20 +01:00
2025-11-09 04:47:20 +01:00
2025-11-11 20:35:08 +01:00
2025-11-13 23:30:14 +01:00
2025-11-13 16:58:44 +01:00
2025-11-15 00:02:54 +01:00
2025-11-02 22:03:22 +01:00
2025-10-14 01:23:49 +02:00
2025-09-11 17:31:00 +02:00
2025-10-15 14:47:43 +02:00
2025-11-10 02:47:57 +01:00
2025-09-11 17:28:13 +02:00
2025-10-17 03:08:16 +02:00
2025-11-03 20:33:56 +01:00
2025-09-11 17:28:13 +02:00
2025-10-14 01:23:38 +02:00
2025-11-02 22:03:21 +01:00
2025-11-02 22:03:19 +01:00
2025-05-06 02:52:51 +02:00
2025-11-09 01:00:18 +01:00
2025-11-02 23:58:15 +01:00
2025-11-09 04:47:20 +01:00
2025-11-02 22:03:22 +01:00
2025-11-02 22:03:21 +01:00
2025-11-02 22:03:21 +01:00
2025-11-02 22:03:21 +01:00
2025-11-16 11:16:05 +01:00
2025-10-15 16:27:22 +02:00
2025-10-14 01:23:38 +02:00
2025-11-10 02:47:57 +01:00
2025-09-11 17:28:13 +02:00
2025-10-23 11:20:49 +02:00
2025-10-24 04:38:49 +02:00
2025-11-02 22:03:21 +01:00
2025-09-11 17:28:13 +02:00