Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Jan 10, 2026

Summary

  • Introduces privacy-first usage analytics to help understand how OpenSpec is being used
  • Only tracks command names and version (no arguments, paths, content, or PII)
  • Easy opt-out via OPENSPEC_TELEMETRY=0 or DO_NOT_TRACK=1 environment variables
  • Automatically disabled in CI environments

Privacy safeguards

This implementation prioritizes user privacy:

Collected NOT Collected
Command name (e.g., init, list) Command arguments
OpenSpec version File paths or content
Error messages or stack traces
IP addresses (explicitly disabled)
Any personally identifiable information

The anonymous ID is a random UUID stored locally with no relation to the user's identity.

Test plan

  • Verify OPENSPEC_TELEMETRY=0 disables tracking
  • Verify DO_NOT_TRACK=1 disables tracking
  • Verify CI=true disables tracking
  • Verify first-run notice displays once
  • Verify commands execute normally with telemetry enabled

🤖 Generated with Claude Code

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 10, 2026

Warning

Rate limit exceeded

@TabishB has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d49a88c and 8910a1f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • README.md
  • openspec/changes/archive/2026-01-09-add-posthog-analytics/.openspec.yaml
  • openspec/changes/archive/2026-01-09-add-posthog-analytics/design.md
  • openspec/changes/archive/2026-01-09-add-posthog-analytics/proposal.md
  • openspec/changes/archive/2026-01-09-add-posthog-analytics/specs/global-config/spec.md
  • openspec/changes/archive/2026-01-09-add-posthog-analytics/specs/telemetry/spec.md
  • openspec/changes/archive/2026-01-09-add-posthog-analytics/tasks.md
  • openspec/specs/global-config/spec.md
  • openspec/specs/telemetry/spec.md
  • package.json
  • src/cli/index.ts
  • src/telemetry/config.ts
  • src/telemetry/index.ts
  • test/telemetry/config.test.ts
  • test/telemetry/index.test.ts

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.

@vibe-kanban-cloud
Copy link

Review Complete

Your review story is ready!

View Story

Comment !reviewfast on this PR to re-generate the story.

Introduces the proposal artifact for adding opt-in telemetry to OpenSpec
using PostHog. Covers command tracking, feature adoption metrics, and
privacy-respecting consent management.
Introduces privacy-first usage analytics to help understand how OpenSpec
is being used. Key privacy protections:

- Only tracks command names and version (no arguments, paths, or content)
- Opt-out via OPENSPEC_TELEMETRY=0 or DO_NOT_TRACK=1
- Auto-disabled in CI environments
- No IP address collection (explicitly disabled)
- Anonymous ID is a random UUID with no PII

Uses PostHog with a reverse proxy to avoid ad blockers. First-run shows
a one-line notice informing users about the collection.
@TabishB TabishB force-pushed the feature/add-posthog-analytics branch from a5f7429 to 8910a1f Compare January 10, 2026 07:08
@TabishB TabishB merged commit 940898c into main Jan 10, 2026
7 checks passed
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.

2 participants