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

Merged
SA
4mo ago
+1-777

What

Removes two high-volume PostHog telemetry pipelines:

  1. Reverts #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 #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 #5653 (renderer PostHog sink, outageReporter module, and the telemetry-only name option on createRelaySocket). ~97k events last week. The version-stamped desktop events from #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.

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.