-
Notifications
You must be signed in to change notification settings - Fork 490
fix(contrib/mcp-go): Report structured tool call errors as error spans #4158
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
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
BenchmarksBenchmark execution time: 2025-11-20 21:36:35 Comparing candidate commit 50ff2b2 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 50ff2b2 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
071b62d to
55d4452
Compare
ae93ce3 to
1c7172d
Compare
55d4452 to
50ff2b2
Compare

What does this PR do?
Fix for spans not marked as errors for tool calls that resulted in an error response.
mcp-gohas two ways for a tool to return an error as documented here: https://mcp-go.dev/servers/tools#error-resultsWe were not handling the "structured error information" case where
IsErroris part of the response. This is part of the MCP Spec.Motivation
Traces like this not marked as errors.
Closes https://datadoghq.atlassian.net/browse/MLOB-4640
Reviewer's Checklist
./scripts/lint.shlocally.Unsure? Have a question? Request a review!