feat: session-scoped correlation ID on feedback analytics events#47
Merged
Conversation
Mint one correlation ID per studio-mcp process (each IDE connection gets a fresh process) and stamp it on every snyk_send_feedback analytics event via NewAnalyticsEventParam, so events emitted by the same session can be joined downstream instead of each call minting its own random ID.
|
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
sathvi-k
approved these changes
Jul 14, 2026
ifeanyiecheruo
approved these changes
Jul 14, 2026
ifeanyiecheruo
left a comment
Contributor
There was a problem hiding this comment.
Changes look good
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Mint one correlation ID per studio-mcp process, each ADE/IDE connection gets a fresh process, and stamp it on every
snyk_send_feedbackanalytics event via NewAnalyticsEventParam, so events emitted by the same session can be joined downstream instead of each call minting its own random ID.Checklist
make generate)make lint-fix)Note
Low Risk
Analytics-only metadata change with backward-compatible empty correlation ID; behavior is covered by unit and handler tests with no changes to auth or tool logic.
Overview
snyk_send_feedbackanalytics can now be joined per MCP session instead of each tool call getting its own interaction ID.The MCP binding mints one UUID when
Start()runs (once per studio-mcp process) and passes it intoNewAnalyticsEventParam, which setsInteractionUUIDsoPayloadForAnalyticsEventParamemits a stableurn:snyk:interaction:<id>on every feedback event in that session.snyk_send_feedbackis wired to usem.correlationID; an empty correlation ID still defers to the existing per-event UUID minting for other callers.Tests cover the analytics helpers, idempotent minting on
McpLLMBinding, and an end-to-end handler test that asserts two feedback calls share the same interaction URN in the analytics payload.Reviewed by Cursor Bugbot for commit 787ae29. Bugbot is set up for automated code reviews on this repo. Configure here.