Skip to content

chore(desktop): remove resource_snapshot and relay_ws_* telemetry events - #5964

Merged
saddlepaddle merged 2 commits into
mainfrom
revert-resource-snapshot-telemetry
Jul 26, 2026
Merged

saddlepaddle merged 2 commits into
mainfrom
revert-resource-snapshot-telemetry

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator

What

Removes two high-volume PostHog telemetry pipelines:

  1. Reverts chore(desktop): fleet memory telemetry — periodic resource_snapshot to PostHog #5777 (resource_snapshot, SUPER-1550) — the every-5-minute desktop memory sampler. At partial rollout it is already ~500k events/day (~2M/week, instantly the Bump react from 18.3.1 to 19.2.0 #3 event in the project); at full fleet adoption it projects to ~1.4M/day on a ~1.3M/day baseline, i.e. a 2x of total ingestion, decoupled from actual usage (desktops idling all weekend keep emitting).
  2. Removes the relay_ws_degraded/relay_ws_recovered/relay_ws_access_denied outage telemetry from feat(workspace-client,desktop): relay WS outage telemetry + version-stamped desktop events #5653 (renderer PostHog sink, outageReporter module, and the telemetry-only name option on createRelaySocket). ~97k events last week. The version-stamped desktop events from feat(workspace-client,desktop): relay WS outage telemetry + version-stamped desktop events #5653 (app_version register) are kept.

Why

These are machine-cadence events, not user actions — they inflate PostHog ingestion volume without corresponding product signal.

Verification

  • bun run typecheck: 35/35 tasks pass
  • Biome clean on all touched files
  • packages/workspace-client relaySocket tests: 4 pass; desktop terminal-ws-transport tests: 15 pass

Note: existing 1.17.x installs keep emitting both event families until they update to a release containing this change.


Open in Stage

Summary by cubic

Remove desktop memory resource_snapshot sampler and relay WebSocket outage telemetry (relay_ws_*) to cut PostHog ingestion and focus on user-signal events. Addresses SUPER-1550 by removing machine-cadence pipelines that doubled ingestion without product value.

  • Refactors

    • Deleted desktop memory telemetry module and tests; removed startMemoryTelemetry/stopMemoryTelemetry calls (no more resource_snapshot).
    • Removed outage reporter and relay_ws_* events from packages/workspace-client; dropped setRelaySocketTelemetry and related tests.
    • Removed optional name from createRelaySocket; updated desktop/web callers.
    • Kept desktop app_version identify properties.
  • Migration

    • Remove any usage of setRelaySocketTelemetry and RelaySocketTelemetryEvent; these are no longer exported from @superset/workspace-client.
    • Drop the name option when calling createRelaySocket.
    • Older desktop versions will keep emitting these events until upgraded.

Written for commit 7695131. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Removed Telemetry

    • Removed desktop memory usage reporting.
    • Removed relay connection health and outage telemetry from desktop, web, and shared connection services.
  • Connection Handling

    • Terminal and event-bus connections continue functioning without telemetry-specific socket labels.
    • Access-denied, reconnection, and socket lifecycle behavior remain available.
  • Maintenance

    • Removed obsolete telemetry APIs, reporting logic, and related tests.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: db132c38-9f94-41c7-8311-2c4b4b79c293

📥 Commits

Reviewing files that changed from the base of the PR and between 51a4d4b and 7695131.

📒 Files selected for processing (15)
  • apps/desktop/src/main/index.ts
  • apps/desktop/src/main/lib/memory-telemetry/index.ts
  • apps/desktop/src/main/lib/memory-telemetry/memory-telemetry.test.ts
  • apps/desktop/src/main/lib/memory-telemetry/memory-telemetry.ts
  • apps/desktop/src/renderer/lib/posthog.ts
  • apps/desktop/src/renderer/lib/terminal/terminal-ws-transport.test.ts
  • apps/desktop/src/renderer/lib/terminal/terminal-ws-transport.ts
  • apps/web/src/app/workspaces/[workspaceId]/components/WebTerminal/TerminalConnection.ts
  • packages/workspace-client/src/index.ts
  • packages/workspace-client/src/lib/eventBus.ts
  • packages/workspace-client/src/lib/relaySocket/index.ts
  • packages/workspace-client/src/lib/relaySocket/outageReporter.test.ts
  • packages/workspace-client/src/lib/relaySocket/outageReporter.ts
  • packages/workspace-client/src/lib/relaySocket/relaySocket.test.ts
  • packages/workspace-client/src/lib/relaySocket/relaySocket.ts
💤 Files with no reviewable changes (14)
  • packages/workspace-client/src/lib/relaySocket/outageReporter.test.ts
  • packages/workspace-client/src/index.ts
  • apps/desktop/src/main/lib/memory-telemetry/index.ts
  • apps/web/src/app/workspaces/[workspaceId]/components/WebTerminal/TerminalConnection.ts
  • apps/desktop/src/main/lib/memory-telemetry/memory-telemetry.test.ts
  • packages/workspace-client/src/lib/relaySocket/index.ts
  • packages/workspace-client/src/lib/eventBus.ts
  • apps/desktop/src/renderer/lib/terminal/terminal-ws-transport.ts
  • apps/desktop/src/renderer/lib/terminal/terminal-ws-transport.test.ts
  • packages/workspace-client/src/lib/relaySocket/outageReporter.ts
  • apps/desktop/src/renderer/lib/posthog.ts
  • apps/desktop/src/main/lib/memory-telemetry/memory-telemetry.ts
  • packages/workspace-client/src/lib/relaySocket/relaySocket.ts
  • apps/desktop/src/main/index.ts

📝 Walkthrough

Walkthrough

The PR removes desktop memory telemetry and relay-socket outage telemetry, including their implementations, exports, integrations, socket naming, and dedicated tests. Core relay-socket connection and reconnection behavior remains.

Changes

Relay-socket telemetry removal

Layer / File(s) Summary
Remove relay-socket outage reporting
packages/workspace-client/src/lib/relaySocket/*, packages/workspace-client/src/index.ts
Relay-socket lifecycle and probe handling no longer report telemetry, and telemetry exports and tests are removed or updated.
Update relay-socket consumers
apps/desktop/src/renderer/lib/posthog.ts, apps/desktop/src/renderer/lib/terminal/*, apps/web/.../TerminalConnection.ts, packages/workspace-client/src/lib/eventBus.ts
PostHog no longer captures relay-socket telemetry, and socket callers no longer provide telemetry names.

Desktop memory telemetry removal

Layer / File(s) Summary
Delete desktop memory telemetry
apps/desktop/src/main/index.ts, apps/desktop/src/main/lib/memory-telemetry/*
Desktop startup and shutdown no longer manage memory telemetry, and its implementation, exports, and tests are deleted.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: kitenite

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Clearly summarizes removal of resource_snapshot and relay_ws_* telemetry from desktop and workspace-client.
Description check ✅ Passed Has What/Why/Verification and enough implementation detail, though the template's Checklist section is missing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-resource-snapshot-telemetry

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.

@ghost

ghost commented Jul 26, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 4 individual chapters for you:

Title
1 Remove resource snapshot memory telemetry
2 Delete relay socket outage reporting logic
3 Remove telemetry wiring from RelaySocket
4 Clean up telemetry consumers and tests
Open in Stage

Chapters generated by Stage for commit 7695131 on Jul 26, 2026 6:44am UTC.

@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit 0a00191 into main Jul 26, 2026
18 checks passed

This branch was previously deployed

1 inactive deployment
preview — 7695131c Deployed Jul 26, 2026 by saddlepaddle via Deploy API #6875
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