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

Add Tribler Config to the sentry event #7665

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tribler/core/sentry_reporter/sentry_scrubber.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self):
'Documents and Settings',
'Users',
]
self.dict_keys_for_scrub = ['USERNAME', 'USERDOMAIN', 'server_name', 'COMPUTERNAME']
self.dict_keys_for_scrub = ['USERNAME', 'USERDOMAIN', 'server_name', 'COMPUTERNAME', 'key']
self.event_fields_to_cut = []
self.exclusions = ['local', '127.0.0.1']

Expand Down
2 changes: 2 additions & 0 deletions src/tribler/gui/tribler_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from tribler.core.utilities.unicode import hexlify
from tribler.core.utilities.utilities import parse_query
from tribler.core.version import version_id
from tribler.gui import gui_sentry_reporter
from tribler.gui.app_manager import AppManager
from tribler.gui.core_manager import CoreManager
from tribler.gui.debug_window import DebugWindow
Expand Down Expand Up @@ -554,6 +555,7 @@ def on_core_connected(self, version):

def on_receive_settings(self, settings):
self.tribler_settings = settings['settings']
gui_sentry_reporter.additional_information['settings'] = self.tribler_settings
self.start_ui()

def start_ui(self):
Expand Down
24 changes: 13 additions & 11 deletions src/tribler/gui/widgets/settingspage.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from tribler.core.utilities.osutils import get_root_state_directory
from tribler.core.utilities.path_util import Path
from tribler.core.utilities.simpledefs import MAX_LIBTORRENT_RATE_LIMIT
from tribler.gui import gui_sentry_reporter
from tribler.gui.defs import (
DARWIN,
PAGE_SETTINGS_ANONYMITY,
Expand Down Expand Up @@ -529,21 +530,22 @@ def on_settings_saved(self, data):
if not data:
return
# Now save the GUI settings
self.window().gui_settings.setValue("family_filter", self.window().family_filter_checkbox.isChecked())
self.window().gui_settings.setValue("disable_tags", self.window().disable_tags_checkbox.isChecked())
self.window().gui_settings.setValue("autocommit_enabled", self.window().channel_autocommit_checkbox.isChecked())
self.window().gui_settings.setValue(
"ask_download_settings", self.window().always_ask_location_checkbox.isChecked()
)
self.window().gui_settings.setValue(
"use_monochrome_icon", self.window().use_monochrome_icon_checkbox.isChecked()
)
self.window().gui_settings.setValue("minimize_to_tray", self.window().minimize_to_tray_checkbox.isChecked())
gui_settings = self.window().gui_settings

gui_settings.setValue("family_filter", self.window().family_filter_checkbox.isChecked())
gui_settings.setValue("disable_tags", self.window().disable_tags_checkbox.isChecked())
gui_settings.setValue("autocommit_enabled", self.window().channel_autocommit_checkbox.isChecked())
gui_settings.setValue("ask_download_settings", self.window().always_ask_location_checkbox.isChecked())
gui_settings.setValue("use_monochrome_icon", self.window().use_monochrome_icon_checkbox.isChecked())
gui_settings.setValue("minimize_to_tray", self.window().minimize_to_tray_checkbox.isChecked())
Comment on lines +533 to +540
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a side refactoring that is not related to the intention of this PR.

self.save_language_selection()
self.window().tray_show_message(tr("Tribler settings"), tr("Settings saved"))

def on_receive_settings(response):
self.window().tribler_settings = response['settings']
settings = response['settings']

self.window().tribler_settings = settings
gui_sentry_reporter.additional_information['settings'] = settings

request_manager.get("settings", on_receive_settings, capture_errors=False)

Expand Down
Loading