feat(observability): add Sentry error reporting to Rust core#131
Merged
Conversation
…figuration support - Added Sentry integration for error reporting in the application, initializing it in the main function. - Introduced a new environment variable `OPENHUMAN_SENTRY_DSN` to configure Sentry DSN. - Updated the observability configuration schema to include a field for Sentry DSN. - Enhanced logging to include Sentry event filtering based on log levels. - Implemented secret scrubbing to protect sensitive information in error reports.
- Introduced new environment variable `OPENHUMAN_ANALYTICS_ENABLED` to enable or disable anonymized analytics and crash reports. - Updated the PrivacyPanel component to sync analytics consent with the core configuration. - Added new functions to handle analytics settings updates and retrieval in the Tauri backend. - Enhanced observability configuration to include analytics settings, defaulting to enabled. - Updated relevant schemas and handlers for analytics settings in the backend.
…s settings function - Reformatted the `openhumanUpdateAnalyticsSettings` function for better readability by adjusting the parameter structure. - Enhanced the output formatting in the `handle_get_analytics_settings` function for improved clarity in the JSON response.
…mization copy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openhuman-coreRust binary for crash and error reportingsentry-tracinglayer sotracing::error!events are captured as Sentry events, WARN/INFO as breadcrumbssend_default_pii: false, hostname removed, user context removed, secrets scrubbed from exception messages (Bearer tokens, API keys,sk-*,token=...)OPENHUMAN_SENTRY_DSNenv var (no-op when unset — safe for local dev)@sentry/react, privacy-first error queue, consent toggle)Closes #37
Changes
Cargo.toml— addsentrycrate withtracing,panic,rustlsfeaturessrc/main.rs— Sentry init as first operation,before_sendhook with secret scrubbingsrc/core/logging.rs— refactor subscriber to layered Registry + sentry-tracing layersrc/openhuman/config/schema/observability.rs— addsentry_dsnfieldsrc/openhuman/config/schema/load.rs— addOPENHUMAN_SENTRY_DSNenv override.env.example— document the new env varTest plan
cargo checkpassesOPENHUMAN_SENTRY_DSN— Sentry is no-op, CLI output unchanged🤖 Generated with Claude Code