Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Nov 5, 2025

This pull request introduces comprehensive MCP (Model Context Protocol) tracing with Sentry for the GitHub Actions Utils CLI, following OpenTelemetry MCP Semantic Conventions. It implements a type-safe wrapper for MCP tool calls, captures detailed attributes and errors, and documents both the implementation and the design rationale. The changes also include extensive testing and updates to user and developer documentation.

MCP Tracing Implementation:

  • Added a generic, type-safe Sentry tracing wrapper (WithSentryTracing) for MCP tool handlers in internal/cli/mcp/sentry.go, enabling automatic span creation, argument extraction, result tracking, and error capture for tool calls.
  • Integrated the tracing wrapper into tool registration in internal/cli/mcp/server.go, simplifying the process of adding new tools with observability.

Documentation and Analysis:

  • Added docs/IMPLEMENTATION_SUMMARY.md summarizing the implementation, usage, attributes, architecture decisions, and future enhancements for MCP tracing.
  • Added docs/ANALYSIS_SENTRY_MCP_INTEGRATION.md providing a deep analysis of the Sentry JavaScript MCP integration, comparing its architecture and features to the new Go implementation.
  • Updated AGENTS.md with a new MCP Tracing section, describing key features, integration instructions, and referencing the full documentation.

These changes collectively deliver robust, production-ready observability for MCP tool calls, with clear documentation and an easy-to-use API for future tool development.

Collected data can be seen here:
https://techprimate.sentry.io/insights/ai/mcp/?project=4510306572828672&statsPeriod=1h

@philprime philprime merged commit b11d134 into main Nov 5, 2025
4 checks passed
@philprime philprime deleted the sentry-mcp branch November 5, 2025 12:53
@sentry
Copy link

sentry bot commented Nov 10, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants