Skip to content

feat: session-scoped correlation ID on feedback analytics events#47

Merged
MaVictor merged 1 commit into
mainfrom
feat/session-correlation-id
Jul 15, 2026
Merged

feat: session-scoped correlation ID on feedback analytics events#47
MaVictor merged 1 commit into
mainfrom
feat/session-correlation-id

Conversation

@MaVictor

@MaVictor MaVictor commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Description

Mint one correlation ID per studio-mcp process, each ADE/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.

Checklist

  • Tests added and all succeed
  • Regenerated mocks, etc. (make generate)
  • Linted (make lint-fix)
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

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_feedback analytics 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 into NewAnalyticsEventParam, which sets InteractionUUID so PayloadForAnalyticsEventParam emits a stable urn:snyk:interaction:<id> on every feedback event in that session. snyk_send_feedback is wired to use m.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.

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.
@MaVictor MaVictor requested review from a team as code owners July 14, 2026 19:52
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@snyk-io

snyk-io Bot commented Jul 14, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@ifeanyiecheruo ifeanyiecheruo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good

@MaVictor MaVictor merged commit afc2138 into main Jul 15, 2026
10 of 11 checks passed
@MaVictor MaVictor deleted the feat/session-correlation-id branch July 15, 2026 13:37
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.

4 participants