diff --git a/Cura.proto b/Cura.proto index a210e4f274..f1e261bece 100644 --- a/Cura.proto +++ b/Cura.proto @@ -40,6 +40,7 @@ message Slice 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 + optional string user_name = 9; // The Digital Factory account name of the user that requested the slice } message Extruder diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index f99d00da3a..80f27db79d 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -534,10 +534,10 @@ void ArcusCommunication::sliceNext() #ifdef SENTRY_URL sentry_value_t user = sentry_value_new_object(); sentry_value_set_by_key(user, "id", sentry_value_new_string(slice_message->sentry_id().c_str())); - if (const auto sentry_user = spdlog::details::os::getenv("CURAENGINE_SENTRY_USER"); ! sentry_user.empty()) + if (slice_message->has_user_name()) { - spdlog::debug("Setting Sentry user to {}", sentry_user); - sentry_value_set_by_key(user, "username", sentry_value_new_string(sentry_user.c_str())); + spdlog::debug("Setting Sentry user to {}", slice_message->user_name()); + sentry_value_set_by_key(user, "username", sentry_value_new_string(slice_message->user_name().c_str())); } sentry_set_user(user); sentry_set_tag("cura.version", slice_message->cura_version().c_str());