Skip to content

feat: add periodic device activity reporter#13

Merged
d4rken merged 1 commit into
mainfrom
feat/device-activity-reporter
Apr 29, 2026
Merged

feat: add periodic device activity reporter#13
d4rken merged 1 commit into
mainfrom
feat/device-activity-reporter

Conversation

@d4rken

@d4rken d4rken commented Apr 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Add DeviceActivityReporter background job that logs active-device counts grouped by client version every 5 minutes, with both 1h and 24h windows.
  • Active = device with lastSeen within the window OR a live WebSocket connection. New ConnectionRegistry.activeDeviceKeys() snapshot exposes the latter.
  • Reporter is wired through Dagger; App constructs it eagerly so the periodic job starts at boot.

Test plan

  • DeviceActivityReporterTest — window membership, format/percent, unknown bucket, sanitizer truncation, sanitized-equivalent grouping
  • ConnectionRegistryTestactiveDeviceKeys snapshot on register/unregister
  • After deploy, confirm device-stats: 1h total=… 24h total=… shows up in operator logs

Logs active-device counts grouped by client version every 5 minutes (1h and 24h windows). Active = lastSeen within window OR currently connected via WebSocket. Adds activeDeviceKeys() snapshot on ConnectionRegistry to surface live connections that haven't recently pinged lastSeen.
@d4rken d4rken merged commit 96a1c96 into main Apr 29, 2026
5 checks passed
@d4rken d4rken deleted the feat/device-activity-reporter branch April 29, 2026 12:35
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