Skip to content

Conversation

@jboolean
Copy link

@jboolean jboolean commented Nov 6, 2025

What does this PR do?

Records MCP session id as a tag on both tool and initialization spans.

Allows correlation of spans within a session.

image.png

Motivation

Relates to MLOB-4373

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Nov 6, 2025
Copy link
Author

jboolean commented Nov 6, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jboolean jboolean requested review from a team, Kyle-Verhoog and rarguelloF November 6, 2025 16:37
@jboolean jboolean changed the title Record session id feat(contrib/mcp-go): Record MCP Session ID as tag Nov 6, 2025
@jboolean jboolean marked this pull request as ready for review November 6, 2025 16:38
@jboolean jboolean marked this pull request as draft November 6, 2025 16:38
@pr-commenter
Copy link

pr-commenter bot commented Nov 6, 2025

Benchmarks

Benchmark execution time: 2025-11-07 19:45:55

Comparing candidate commit 0dbdc42 in PR branch jb/contrib-mcp-go-session-tag with baseline commit f2727e3 in branch jb/contrib-mcp-go-init-span.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 0 unstable metrics.

@jboolean jboolean marked this pull request as ready for review November 6, 2025 16:39
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Nov 6, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 13fd4f2 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from 498ae3a to 792093f Compare November 7, 2025 18:57
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from 6729310 to 7509609 Compare November 7, 2025 18:57
@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from 792093f to 27c29ed Compare November 7, 2025 19:01
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from 7509609 to 46fb4de Compare November 7, 2025 19:01
@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from 27c29ed to f2727e3 Compare November 7, 2025 19:40
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from 46fb4de to 0dbdc42 Compare November 7, 2025 19:40
@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from f2727e3 to 5f20214 Compare November 7, 2025 19:43
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from 0dbdc42 to 13fd4f2 Compare November 7, 2025 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants