feat(telemetry): include org_id in heartbeat payload (v9.1 #2277)#76
Merged
Merged
Conversation
Brings the Cursor plugin's telemetry heartbeat up to parity with the platform's startup_telemetry.go emitter. Every ping body now identifies which deployment-organization emitted it via an org_id field on the wire. Three sources, precedence order: 1. ORG_ID env var when set (operator's explicit configuration). 2. tenant_id from ~/.config/axonflow/try-registration.json (cs_<uuid>). 3. local-dev-org sentinel. Always emitted. Receiver carries omitempty for backward compat. Test coverage (tests/heartbeat-real-stack/run_real_stack.sh): new assertion that the captured ping body's org_id matches the registered cs_<uuid> tenant_id. 15/15 PASS. Mutation-tested in worktree: stripping the org_id field from the jq payload causes the new assertion to fail. (Same pattern as the Claude Code plugin sister PR, which captured the failure log explicitly.) Companion wording sweep: - scripts/telemetry-ping.sh header "Anonymous telemetry heartbeat" → "Telemetry heartbeat" — operator-supplied ORG_ID on self-hosted is not anonymized. CHANGELOG.md [Unreleased] expanded with org_id Added bullet + the header wording change under Changed. Sister PRs across all 5 SDKs (Go/Python/TS/Java merged; Rust open) and 3 other plugins (claude/codex/openclaw) land in the same session. Privacy.html update landed first on axonflow-landing main: see axonflow-landing#129 (merged 2026-05-21). Refs: getaxonflow/axonflow-enterprise#2230 (Epic v9 identity) Refs: getaxonflow/axonflow-enterprise#2277 (v9.1 SDK + plugin org_id) Signed-off-by: Saurabh Jain <saurabh.jain@getaxonflow.com>
7db8af6 to
b9dd369
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
org_idfield to the Cursor plugin's telemetry heartbeat, in parity with the platform'sstartup_telemetry.goemitter (Epic #2230, Issue #2277). Sister PR to claude#89, codex (next), openclaw (next), and the 5 SDK PRs.Three sources, precedence order:
ORG_IDenv var when set.tenant_idfrom~/.config/axonflow/try-registration.json— thecs_<uuid>Community SaaS identifier.local-dev-orgsentinel.DoD
scripts/telemetry-ping.shjq heredoc addsorg_idfield; source priority encoded above the payload blocktests/heartbeat-real-stack/run_real_stack.sh— capturedorg_idMUST match registeredcs_<uuid>tenant_idruntime-e2e/v1_telemetry_schema/test.shwraps the harness automatically[Unreleased]scripts/telemetry-ping.shheaderRefs: getaxonflow/axonflow-enterprise#2230
Refs: getaxonflow/axonflow-enterprise#2277