Skip to content

docs(fumadocs): document SDK/CLI telemetry and opt-outs - #144

Closed
tembo[bot] wants to merge 1 commit into
mainfrom
tembo/docs-telemetry
Closed

tembo[bot] wants to merge 1 commit into
mainfrom
tembo/docs-telemetry

Conversation

@tembo

@tembo tembo Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #141 shipped PostHog telemetry, error tracking, and the new telemetry?: boolean client option, but the docs site had no telemetry page and the client reference did not list the option. This PR closes that gap with a dedicated, scannable Telemetry page verified against packages/email-sdk/src/telemetry.ts, core.ts, and cli.ts — no fabricated behavior.

Documentation-only change.

Docs added / updated

  • New page apps/fumadocs/content/docs/telemetry.mdx — top-level page (parallel to Authentication), registered in content/docs/meta.json after authentication. Covers:
    • Intent and the opt-out, anonymous-by-default model, plus the first-run stderr notice.
    • Common properties and a table of all four events (client created, email sent, email batch sent, cli command run) with their exact property names.
    • delivery_path values (single / bulk_native / bulk_expanded) and the one-event-per-send() no-double-counting guarantee.
    • The error-reporting redaction pipeline (stack-frame path collapsing, message/name scrubbing, allowlisted error names, per-process dedupe/caps) and which errors are excluded.
    • Storage (~/.config/email-sdk/telemetry.json, XDG_CONFIG_HOME), write-only key, US PostHog host, fire-and-forget 3s timeout, read-only-FS behavior.
    • CI-vendor detection table, including why Vercel runtime is deliberately not treated as CI.
    • Every opt-out: EMAIL_SDK_TELEMETRY=0/false/off, DO_NOT_TRACK=1/true, telemetry: false, and NODE_ENV=test.
  • apps/fumadocs/content/docs/reference/client.mdx — added the telemetry option to the createEmailClient options TypeTable and a cross-link to the new page.

Codepaths covered

  • packages/email-sdk/src/telemetry.ts — createTelemetry, opt-out precedence (isTelemetryDisabled), CI detection (detectCiVendor), redaction (redactErrorMessage, sanitizeErrorName, sanitizeFrameFilename), dedupe/caps, state storage.
  • packages/email-sdk/src/core.ts — client created, email sent (incl. delivery_path, used_recipient_variables, used_send_at), and email batch sent property shapes; telemetry: false handling.
  • packages/email-sdk/src/cli.ts — cli command run properties, source: "cli" tagging, and flush-before-exit.

Key knowledge gaps addressed

  • There was no discoverable place documenting what telemetry collects and how to turn it off beyond the README section — now surfaced in the docs nav.
  • The public telemetry client option was undocumented in the client reference.
  • The redaction guarantees for error reports (previously only implied by source comments) are now stated for users evaluating the SDK against privacy/compliance requirements.

Validation

  • bun run types:check in apps/fumadocs (runs fumadocs-mdx && tsc --noEmit): passes — the new MDX compiles and frontmatter validates.
  • Callout (from defaultMdxComponents) and TypeTable are globally registered in src/components/mdx.tsx; the Activity icon resolves via lucide-react.
  • Full bun run build was not run (it fetches Notra blog posts over the network); the MDX compilation covered by types:check is the relevant check for this content change.

🤖 Generated by the Tembo documentation agent, triggered by the merge of #141.


Want tembo to make any changes? Add a comment with @tembo and i'll get back to work!

View on Tembo View Agent Settings View on automation

@tembo tembo Bot added the tembo Pull request created by Tembo label Jul 6, 2026
@vercel

vercel Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
email-sdk-fumadocs Ready Ready Preview, Comment Jul 6, 2026 5:09pm

Request Review

@tembo
tembo Bot requested a review from leoisadev1 July 6, 2026 17:09
@tembo

tembo Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Requesting review from @leoisadev1 who has experience with the following files modified in this PR:

  • apps/fumadocs/content/docs/meta.json

@leoisadev1

Copy link
Copy Markdown
Member

Superseded by #147, which adds the /docs/telemetry page (plus the client-reference telemetry option and sidebar entry) rewritten in the post-#128 docs voice and re-verified against packages/email-sdk/src/telemetry.ts. Thanks — the docs site was indeed missing a telemetry disclosure page.

@leoisadev1 leoisadev1 closed this Jul 6, 2026
leoisadev1 added a commit that referenced this pull request Jul 6, 2026
* docs: telemetry page, Homebrew install tab, convex typed returns

Ports the real gaps from the Tembo draft PRs (#134, #136, #144) onto
post-#128 main:

- New /docs/telemetry page covering collected events, error-report
  redaction, storage/transport, CI detection, and every opt-out,
  verified against packages/email-sdk/src/telemetry.ts and core.ts.
  Adds the telemetry option to the client reference and a meta.json
  entry.
- Homebrew tab on the install page plus a pointer from the CLI
  reference, matching Formula/email-sdk.rb and the release automation
  (which opens a formula-bump PR rather than pushing to main).
- One-line notes that convex-email status/listEvents returns are typed
  and the ConvexEmailDoc/ConvexEmailEventDoc/ConvexEmailDeliveryStatus
  types are exported.

Generated-By: PostHog Code
Task-Id: ec2538f2-5c80-4142-b4b3-b1a53394862e

* docs(agents): live-check scripts also load .env after .env.local

Generated-By: PostHog Code
Task-Id: ec2538f2-5c80-4142-b4b3-b1a53394862e

This branch was successfully deployed

1 active deployment
Preview — ece1339f Deployed Jul 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tembo Pull request created by Tembo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant