Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ New Feature - telemetry #123

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mfreeman451
Copy link

@mfreeman451 mfreeman451 commented Mar 8, 2025

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 mfreeman451 marked this pull request as draft March 8, 2025 22:13
Copy link
Author

@mfreeman451 mfreeman451 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mfreeman451 mfreeman451 marked this pull request as ready for review March 9, 2025 01:23
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