Skip to content

fix(telemetry): pause Mixpanel and give the usage events their final names - #2370

Merged
fforootd merged 1 commit into
mainfrom
claude/telemetry-pause-mixpanel
Oct 26, 2026
Merged

fforootd merged 1 commit into
mainfrom
claude/telemetry-pause-mixpanel

Conversation

@fforootd

Copy link
Copy Markdown
Member

Summary

Mixpanel has never received the CLI's production events. This PR pauses Mixpanel until that's fixed, and gives the events the names they'll be released under.

Why Mixpanel gets nothing. The production token baked into the CLI (config.ts), and into the service ping, belongs to Next Gen Production. That project is in Mixpanel's US region. Both send through the cloud's /telemetry/mixpanel/* rewrite to api-eu.mixpanel.com, the EU endpoint, which drops events for a US project.

CLI

  • No baked Mixpanel token: resolveTelemetryToken returns only ZITADEL_TELEMETRY_TOKEN, so the CLI sends Mixpanel nothing by default. Consent no longer depends on a token.
  • The Vercel copy sends on its own: before, it only went out alongside a Mixpanel client. Now telemetry is on when either destination is configured. With neither, it stays inert and writes no install id.
  • Final event names: the copy keeps the event's own name, cli_command_started rather than poc_cli_command_started.
  • Debug output: --debug prints the Mixpanel payload only when Mixpanel sends, and says [telemetry] mixpanel: no token when it doesn't.

Server ping:

  • service_ping.mixpanel_token now defaults to empty, so the ping sends Mixpanel nothing unless a token is set.
  • Its event is service_ping rather than poc_service_ping.
  • It is still off by default.

Catalog and docs:

  • The event catalog drops its prefix entries and notes the pause. Events keep mixpanel as a destination for when it returns.
  • The telemetry docs page now says what is sent today: eight properties to Vercel Web Analytics. It lists what Mixpanel would get as a separate section.
  • The CLI's AGENTS.md, product-analytics.md and the cloud runbook say Mixpanel is paused.

Coming back to Mixpanel: create a production project in the EU region, or point the production channel at the US region, then bake its token back into config.ts and the ping's default.

Validation

  • moon run cli:typecheck cli:lint cli:test: passed, 4,437 tests in 254 files.
  • go test ./internal/serviceping/: ok.
  • go test ./cmd/server/: every test passes except TestBuildHTTPMuxServesTheConsoleAndTheAPIAtRoot and TestBuildHTTPMuxDoesNotMountTheAPIUnderAPIPrefix. Both need a console build (moon run console:build), which this worktree didn't have, and neither touches the ping.
  • gofmt -l on the changed Go packages: clean.
  • node scripts/check-changesets-status.mjs and --pending: ok. node scripts/check-pr-title.mjs --title "…": ok.
  • End to end, without touching production: I ran the built CLI as api ls --json --debug with ZITADEL_TELEMETRY_VERCEL_ENDPOINT pointed at a local listener.
    • It logged mixpanel: no token.
    • The listener received cli_command_started and cli_command_completed with the eight properties, and answered 200.
  • Where the diagnosis comes from:
    • Mixpanel connector: Next Gen Production (4035579) holds the CLI's production token. Mixpanel's US server can read it, and it has no events. Next Gen Dev and Next Gen QA are EU projects.
    • Vercel Web Analytics: the cloud project received the CLI's poc_ events.
  • Not run: the docs build, and a run against the live Vercel intake, which would add a production event.

Release notes / changeset

All four telemetry changesets from #2253 and #2296 are still unreleased, so I edited them rather than adding ones that contradict them:

  • .changeset/cli-vercel-usage-copy.md (@zitadel/cli, minor), rewritten: the CLI sends its anonymous usage events to Vercel Web Analytics, with at most eight properties, and nothing to Mixpanel for now. The released 0.1.0 sends to Mixpanel, so this is what changes for users.
  • Deleted: .changeset/cli-telemetry-proxy.md. The CLI no longer sends to Mixpanel through the cloud by default.
  • Deleted: .changeset/server-service-ping-mixpanel.md. The ping no longer reports to Mixpanel by default.
  • Unchanged: .changeset/server-service-ping.md. It already describes a ping to Vercel Web Analytics only.

Notes

  • Development runs still count as production traffic. A run of the built CLI without ZITADEL_TELEMETRY_ENV=development (node apps/cli/bin/run.js …) is production traffic. Only scripts/run-cli.mjs sets that variable. Without the prefix, such runs land under the release names.
  • Still Vercel's private path and format: the Vercel copy keeps posting to /_vercel/insights/event in the format that path expects, as feat(telemetry): send CLI usage events and a service ping to Vercel Web Analytics #2253 noted. That is unchanged here.
  • Kept for the comeback: the /telemetry/mixpanel/* rewrite, its deployment check and the Mixpanel SDK all stay.

🤖 Generated with Claude Code

…names

The production Mixpanel token the CLI and the service ping bake in belongs
to a project in Mixpanel's US region, while both send to its EU endpoint,
which drops the events. Pause Mixpanel until a project and its region
agree: the CLI bakes in no token, so only ZITADEL_TELEMETRY_TOKEN sends to
it, and the ping has no default token. The Vercel Web Analytics copy no
longer needs a Mixpanel client to send, and the events drop the poc_
prefix: cli_command_started, cli_command_completed, cli_command_failed and
service_ping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cloud Ready Ready Preview Oct 26, 2026 11:22pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: 19a5092

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@zitadel/cli Minor
@zitadel/docs Patch
@zitadel/testing Minor
@zitadel/server Minor
@zitadel/server-linux-x64 Minor
@zitadel/server-linux-arm64 Minor
@zitadel/server-darwin-x64 Minor
@zitadel/server-darwin-arm64 Minor
@zitadel/server-win32-x64 Minor
@zitadel/api Minor
@zitadel/config Minor
@zitadel/components Minor
@zitadel/sdk-core Minor
@zitadel/sdk-next Minor
@zitadel/sdk-nuxt Minor
@zitadel/sdk-react Minor
@zitadel/sdk-vue Minor
@zitadel/sdk-angular Minor
@zitadel/sdk-solid Minor
@zitadel/sdk-svelte Minor
@zitadel/sdk-qwik Minor
@zitadel/sdk-sveltekit Minor
@zitadel/sdk-solid-start Minor
@zitadel/sdk-qwik-router Minor
@zitadel/sdk-tanstack-start Minor
@zitadel/website Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zitadel-kanban zitadel-kanban Bot moved this to Inbox in Engineering Kanban Oct 26, 2026
@fforootd
fforootd marked this pull request as ready for review October 26, 2026 23:29
Copilot AI balanced review requested due to automatic review settings October 26, 2026 23:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-26T23:31:31.813891Z 19a5092 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI 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.

🔵 Needs a closer look

It is a cross-cutting telemetry/release change that alters shipped event names and edits customer-facing changesets across the Go server, CLI, and docs, which warrants final human review despite no issues being found.

No open issues 🎉

What changed in this PR

This PR pauses the CLI's and service ping's Mixpanel reporting and promotes the proof-of-concept telemetry events to their final release names. Mixpanel never received production events because the baked-in production token points at a US project while traffic is routed through the EU proxy endpoint; rather than ship a broken integration, this PR removes the baked token so telemetry flows only to Vercel Web Analytics for now, while keeping the Mixpanel plumbing in place for when a correctly-regioned project exists. It fits into the pre-release telemetry work started in #2253 and #2296 (all still unreleased), so it edits those changesets in place rather than contradicting them.

Changes:

  • Remove the baked Mixpanel tokens (CLI config.ts and server ping default), so Mixpanel only sends when ZITADEL_TELEMETRY_TOKEN / service_ping.mixpanel_token is set; telemetry is now "enabled" whenever either Mixpanel or the Vercel copy has a destination, and no install id is written when there is no destination.
  • Drop the poc_ prefix from event names and the catalog's prefix entries, giving events their release names (cli_command_*, service_ping), with --debug printing [telemetry] mixpanel: no token when Mixpanel is inert.
  • Update docs (telemetry page, product-analytics, cloud runbook, CLI AGENTS.md) and changesets to describe Vercel-only reporting with Mixpanel paused.
File Description
apps/​cli/​src/​lib/​telemetry/​config.ts Removes baked dev/prod tokens; resolveTelemetryToken now only reads ZITADEL_TELEMETRY_TOKEN; doc comments updated.
apps/​cli/​src/​lib/​telemetry/​consent.ts Drops the no-token reason and resolved-token field; consent no longer depends on a token.
apps/​cli/​src/​lib/​telemetry/​index.ts Telemetry is enabled when Mixpanel or Vercel has a destination; builds the Mixpanel client only with a token; skips install-id write when no destination.
apps/​cli/​src/​lib/​telemetry/​vercel.ts Removes VERCEL_EVENT_PREFIX; Vercel copy keeps the event's own name.
apps/​cli/​src/​lib/​oclif/​command-telemetry.ts, base.ts, user-agent.ts Comment updates reflecting the paused/no-token wording.
apps/​cli/​AGENTS.md Documents that Mixpanel is paused and only an explicit token enables it.
apps/​cli/​tests/​unit/​lib/​telemetry/​*.test.ts Updates consent/config/telemetry/vercel/catalog tests for the paused Mixpanel and prefix-free names; adds no-token coverage.
internal/​serviceping/​serviceping.go Removes EventPrefix/DefaultMixpanelToken; EventName is service_ping; doc comments updated.
internal/​serviceping/​catalog_test.go Drops prefix assertions; matches events by the un-prefixed EventName.
cmd/​server/​server.go, config.go Defaults service_ping.mixpanel_token to empty; comment update.
docs/​product-analytics-events.yaml, product-analytics.md Remove prefix entries; note Mixpanel is paused while keeping mixpanel as a destination.
docs/​runbooks/​cloud.md, apps/​docs/​.../​telemetry.mdx Describe Vercel-only reporting today and the paused Mixpanel path.
.changeset/​cli-vercel-usage-copy.md Rewritten to describe Vercel-only usage events, nothing to Mixpanel.
.changeset/​cli-telemetry-proxy.md, server-service-ping-mixpanel.md Deleted: the CLI/ping no longer send to Mixpanel by default.

Review effort: Balanced

Merged via the queue into main with commit 4e2906c Oct 26, 2026
18 of 19 checks passed
@fforootd
fforootd deleted the claude/telemetry-pause-mixpanel branch October 26, 2026 23:35
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Oct 26, 2026

This branch was successfully deployed

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

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants