mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Add optional (opt-in) project_name to Sentry
Needed for automatic Issue handling in the future Contributes to CURA-11482
This commit is contained in:
parent
e91322d070
commit
7738059631
3 changed files with 8 additions and 2 deletions
|
@ -35,6 +35,7 @@ message Slice
|
|||
repeated EnginePlugin engine_plugins = 5;
|
||||
string sentry_id = 6; // The anonymized Sentry user id that requested the slice
|
||||
string cura_version = 7; // The version of Cura that requested the slice
|
||||
optional string project_name = 8; // The name of the project that requested the slice
|
||||
}
|
||||
|
||||
message Extruder
|
||||
|
|
|
@ -340,6 +340,11 @@ class StartSliceJob(Job):
|
|||
self._slice_message.sentry_id = f"{user_id}"
|
||||
self._slice_message.cura_version = CuraVersion
|
||||
|
||||
# Add the project name to the message if the user allows for non-anonymous crash data collection.
|
||||
account = CuraApplication.getInstance().getCuraAPI().account
|
||||
if account and account.isLoggedIn and not CuraApplication.getInstance().getPreferences().getValue("info/anonymous_engine_crash_report"):
|
||||
self._slice_message.project_name = CuraApplication.getInstance().getPrintInformation().baseName
|
||||
|
||||
# Build messages for extruder stacks
|
||||
for extruder_stack in global_stack.extruderList:
|
||||
self._buildExtruderMessage(extruder_stack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue