Skip to content

Add telemetry opt-out via DO_NOT_TRACK and MCPJAM_TELEMETRY_DISABLED env vars#1546

Merged
ignaciojimenezr merged 5 commits intoMCPJam:mainfrom
ignaciojimenezr:disable-sdk-telemetry
Mar 9, 2026
Merged

Add telemetry opt-out via DO_NOT_TRACK and MCPJAM_TELEMETRY_DISABLED env vars#1546
ignaciojimenezr merged 5 commits intoMCPJam:mainfrom
ignaciojimenezr:disable-sdk-telemetry

Conversation

@ignaciojimenezr
Copy link
Copy Markdown
Collaborator

Closes #1544

@chelojimenez
Copy link
Copy Markdown
Contributor

chelojimenez commented Mar 6, 2026

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

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

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

@ignaciojimenezr ignaciojimenezr marked this pull request as ready for review March 6, 2026 23:32
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Mar 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f59fa04f-dfbf-4130-9940-f998965bdbe0

📥 Commits

Reviewing files that changed from the base of the PR and between a31a834 and 493f1a8.

📒 Files selected for processing (1)
  • sdk/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • sdk/README.md

Walkthrough

Two telemetry documentation blocks were added to sdk/README.md describing anonymous usage metrics and environment-variable options to disable telemetry. In sdk/src/telemetry.ts, the exported posthog became conditional: the module now checks DO_NOT_TRACK or MCPJAM_TELEMETRY_DISABLED and exports a noopPosthog shim when disabled, otherwise it exports a real PostHog instance. No other public declarations were changed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@sdk/src/telemetry.ts`:
- Around line 7-17: The noopPosthog object has a capture signature with no args
which causes the exported posthog to have an incompatible union type; update
noopPosthog so its method signatures match PostHog's API (e.g., change capture
to accept the same EventMessage parameter, and ensure flush/shutdown match
PostHog types), import or reference PostHog/EventMessage types and type-annotate
noopPosthog (or cast noopPosthog as PostHog) so the exported posthog variable
has a consistent PostHog-compatible type rather than PostHog | typeof
noopPosthog.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2ca44975-0803-4fa9-923e-733b3582e997

📥 Commits

Reviewing files that changed from the base of the PR and between 3817280 and 1493302.

📒 Files selected for processing (2)
  • sdk/README.md
  • sdk/src/telemetry.ts

Comment thread sdk/src/telemetry.ts
Copy link
Copy Markdown
Contributor

@chelojimenez chelojimenez left a comment

Choose a reason for hiding this comment

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

:shipi

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 9, 2026
@ignaciojimenezr ignaciojimenezr merged commit a27869d into MCPJam:main Mar 9, 2026
4 of 6 checks passed
@mgyarmathy
Copy link
Copy Markdown

Thanks @ignaciojimenezr !

@ignaciojimenezr
Copy link
Copy Markdown
Collaborator Author

of course!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Option to disable telemetry in @mcpjam/sdk

3 participants