Skip to content

Conversation

@jboolean
Copy link
Contributor

@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
Contributor Author

jboolean commented Nov 6, 2025

@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-18 16:38:12

Comparing candidate commit bfb14e7 in PR branch jb/contrib-mcp-go-session-tag with baseline commit 0013a0e in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 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: bfb14e7 | 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 d145ec1 to df08e16 Compare November 12, 2025 17:59
@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from 3f1c7fb to 469570e Compare November 12, 2025 17:59
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from df08e16 to 1110edf Compare November 12, 2025 18:18
@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from 469570e to c704875 Compare November 12, 2025 18:18
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from 1110edf to ec47a08 Compare November 13, 2025 14:42
@jboolean jboolean force-pushed the jb/contrib-mcp-go-init-span branch from c704875 to be367d4 Compare November 13, 2025 14:42
@jboolean jboolean changed the base branch from jb/contrib-mcp-go-init-span to graphite-base/4106 November 13, 2025 16:49
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from ec47a08 to d9ed4ea Compare November 14, 2025 14:58
@jboolean jboolean changed the base branch from graphite-base/4106 to jb/contrib-mcp-go-init-span November 14, 2025 14:59
Base automatically changed from jb/contrib-mcp-go-init-span to main November 18, 2025 15:31
@jboolean jboolean force-pushed the jb/contrib-mcp-go-session-tag branch from d9ed4ea to bfb14e7 Compare November 18, 2025 15:50
Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 18, 2025

View all feedbacks in Devflow UI.

2025-11-18 15:51:29 UTC ℹ️ Start processing command /merge


2025-11-18 15:51:40 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-11-18 16:41:28 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in main is approximately 24m (p90).


2025-11-18 17:40:18 UTC ℹ️ MergeQueue: This merge request was merged

Copy link
Contributor Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 18, 2025

View all feedbacks in Devflow UI.

2025-11-18 15:51:51 UTC ℹ️ Start processing command /merge


2025-11-18 15:51:53 UTC ❌ MergeQueue

PR already in the queue with status waiting

@dd-mergequeue dd-mergequeue bot merged commit 7ce9243 into main Nov 18, 2025
246 checks passed
@dd-mergequeue dd-mergequeue bot deleted the jb/contrib-mcp-go-session-tag branch November 18, 2025 17:40
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 mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants