Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Summary

Add comprehensive telemetry enhancements for better product insights.

Runtime & Platform Data

  • Add runtimeType (local/worktree/ssh) to workspace_created and message_sent
  • Add frontend platform info (userAgent, platform) for mux server mode
  • Enhance backend platform data with nodeVersion and bunVersion

New Events

Event Purpose Fields
stream_completed Track completion vs interruption model, wasInterrupted, duration_b2, output_tokens_b2
provider_configured Track provider setup (not keys!) provider, keyType
command_used Track slash command usage command type
voice_transcription Track voice input adoption audio_duration_b2, success

Enhanced Events

Event Enhancement
app_started Added vimModeEnabled
message_sent Added thinkingLevel

Privacy

All metrics use base-2 rounding for privacy-preserving numerical data. No sensitive information (SSH hosts, API keys, project names, etc.) is ever sent.


Generated with mux

Add comprehensive telemetry enhancements for better product insights:

Runtime & Platform Data:
- Add runtimeType (local/worktree/ssh) to workspace_created and message_sent
- Add frontend platform info (userAgent, platform) for mux server mode
- Enhance backend platform data with nodeVersion and bunVersion

New Events:
- stream_completed: Track completion vs interruption, duration, output tokens
- provider_configured: Track which providers users set up (not keys!)
- command_used: Track slash command usage patterns
- voice_transcription: Track voice input adoption and success rate

Enhanced Events:
- app_started: Add vimModeEnabled for vim mode adoption
- message_sent: Add thinkingLevel for extended thinking usage

All metrics use base-2 rounding for privacy-preserving numerical data.

_Generated with `mux`_
Move rounding logic into centralized tracking functions so callers
don't need to manually call roundToBase2(). This ensures consistent
privacy-preserving transformations across all telemetry call sites.

Changes:
- Add src/common/telemetry/tracking.ts with all tracking functions
- Tracking functions accept raw values and handle rounding internally
- Remove roundToBase2/getFrontendPlatformInfo from public exports
- Simplify useTelemetry hook to delegate to tracking functions
- Update WorkspaceStore, useVoiceInput, chatCommands to use new API

The public API is now cleaner:
- trackMessageSent(model, mode, messageLength, ...) - no rounding needed
- trackStreamCompleted(model, interrupted, durationSecs, outputTokens)
- trackVoiceTranscription(audioDurationSecs, success)

_Generated with `mux`_
@ammario ammario merged commit 66992a2 into main Dec 5, 2025
17 checks passed
@ammario ammario deleted the telemetry-runtime-platform-data branch December 5, 2025 19:59
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