Skip to content

feat(telemetry): include org_id in heartbeat payload (v9.1 #2277)#76

Merged
saurabhjain1592 merged 1 commit into
mainfrom
feat/v91-org-id-telemetry-payload
May 21, 2026
Merged

feat(telemetry): include org_id in heartbeat payload (v9.1 #2277)#76
saurabhjain1592 merged 1 commit into
mainfrom
feat/v91-org-id-telemetry-payload

Conversation

@saurabhjain1592

Copy link
Copy Markdown
Member

Summary

Adds an org_id field to the Cursor plugin's telemetry heartbeat, in parity with the platform's startup_telemetry.go emitter (Epic #2230, Issue #2277). Sister PR to claude#89, codex (next), openclaw (next), and the 5 SDK PRs.

Three sources, precedence order:

  1. ORG_ID env var when set.
  2. tenant_id from ~/.config/axonflow/try-registration.json — the cs_<uuid> Community SaaS identifier.
  3. local-dev-org sentinel.

DoD

  • Code: scripts/telemetry-ping.sh jq heredoc adds org_id field; source priority encoded above the payload block
  • Wire-shape harness: new assertion in tests/heartbeat-real-stack/run_real_stack.sh — captured org_id MUST match registered cs_<uuid> tenant_id
  • Mutation-tested (same pattern as claude#89)
  • Runtime-e2e gate: runtime-e2e/v1_telemetry_schema/test.sh wraps the harness automatically
  • CHANGELOG entry under [Unreleased]
  • Wording sweep on scripts/telemetry-ping.sh header
  • Harness end-to-end: 15/15 PASS

Refs: getaxonflow/axonflow-enterprise#2230
Refs: getaxonflow/axonflow-enterprise#2277

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>
@saurabhjain1592 saurabhjain1592 force-pushed the feat/v91-org-id-telemetry-payload branch from 7db8af6 to b9dd369 Compare May 21, 2026 13:13
@saurabhjain1592 saurabhjain1592 merged commit 85c5f64 into main May 21, 2026
12 checks passed
@saurabhjain1592 saurabhjain1592 deleted the feat/v91-org-id-telemetry-payload branch May 21, 2026 13:14
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.

1 participant