Skip to content

feat: add web console usage telemetry#544

Open
emrberk wants to merge 11 commits intomainfrom
feat/usage-telemetry
Open

feat: add web console usage telemetry#544
emrberk wants to merge 11 commits intomainfrom
feat/usage-telemetry

Conversation

@emrberk
Copy link
Collaborator

@emrberk emrberk commented Mar 18, 2026

Adds anonymous, opt-in usage telemetry to the web console. Events are stored locally in IndexedDB and flushed to the server in batches.

Telemetry infrastructure (ConsoleEventTracker module)

  • trackEvent(name, payload?): fire-and-forget entry point; writes to IndexedDB via Dexie (db.ts)
  • sendPipeline.ts: background flush loop that runs every 5 s when there are pending events
  • Calls console-events-config to get the server-side cursor (lastUpdated), then POSTs only newer events via add-console-events
  • Exponential back-off (base 1 s, up to 2^9 s) with independent retry counters for the check and send phases
    • MAX_BATCH_SIZE = 1 000 events per POST; successfully sent entries are deleted from IndexedDB immediately
    • On startup, trimToMaxRows(10 000) evicts the oldest events to bound local storage

@emrberk emrberk marked this pull request as ready for review March 19, 2026 15:30
@jerrinot
Copy link
Contributor

when someone click at the "(AI) Configure" button then we don't collect it as an event. maybe we should? "people who read about the AI assistance but decided NOT to set it up"?

Screenshot From 2026-03-19 18-09-11

@jerrinot
Copy link
Contributor

the PR description says:

Adds anonymous, opt-in usage telemetry to the web console.

is it actually opt-in? the console did not ask me anything yet it's sending events.

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.

2 participants