Skip to content

Add metrics for MCP #8497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 5, 2025
Merged

Add metrics for MCP #8497

merged 6 commits into from
May 5, 2025

Conversation

joehan
Copy link
Contributor

@joehan joehan commented May 1, 2025

Description

Add simple metrics for MCP - now we get # of calls per tool, # of errors per tool, and # of times list tools is called.

@joehan joehan requested a review from mbleigh May 1, 2025 22:16
} catch (err: unknown) {
await trackGA4("mcp_tool_call", { tool_name: toolName, error: 1 });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should also mark as an error if isError is true in the returned content.

@joehan joehan requested a review from nohe427 May 2, 2025 22:12
@joehan joehan enabled auto-merge (squash) May 5, 2025 20:40
@joehan joehan merged commit 955bf42 into master May 5, 2025
49 of 50 checks passed
@joehan joehan deleted the jh-mcp-metrics branch May 6, 2025 16:10
blidd-google pushed a commit that referenced this pull request May 12, 2025
* Add metrics for MCP

* check iserror field as well

* format

* format
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