rayhunter icon indicating copy to clipboard operation
rayhunter copied to clipboard

✨ New Feature - telemetry

Open mfreeman451 opened this issue 10 months ago • 0 comments

Telemetry System Implementation

This PR adds an optional telemetry system to Rayhunter.

Features Added

  • Anonymous Device Identification: Generates a hash-based device ID with no personally identifiable information
  • Configurable Data Collection:
    • System statistics (disk usage, memory usage)
    • Warning events with timestamps and severity
    • Recording information (duration, size, count)
  • Privacy-Focused Design:
    • Disabled by default, requires explicit opt-in
    • No collection of raw network data
    • No personal information transmitted
  • Web UI Configuration: Settings interface for enabling/disabling and configuring telemetry
  • API Authentication: Uses API key for secure data transmission
  • Periodic or Manual Transmission: Configurable transmission interval with option for manual triggers

Technical Implementation

  • Background worker thread for data collection and transmission
  • Non-blocking communication via channels
  • Persistent configuration via config file
  • Comprehensive error handling with new TelemetryInitError variant
  • Full API documentation with rustdoc comments
  • Example config for easy setup

Updates to Documentation

  • Added README section on telemetry
  • Created sample config file with telemetry settings
  • Added detailed API documentation

Testing Notes

To test the telemetry system:

  1. Enable telemetry in the config file
  2. Set a valid endpoint and API key
  3. View telemetry status in the web UI settings page
  4. Trigger warnings to see telemetry capture in action

Telemetry can be easily enabled/disabled via the web UI or by editing the config file.

mfreeman451 avatar Mar 08 '25 22:03 mfreeman451