From 8dc6e7a38670d81e919d4b3a817834308d6029b0 Mon Sep 17 00:00:00 2001 From: Nino van Hooff Date: Thu, 19 Dec 2019 09:45:35 +0100 Subject: [PATCH] Add encvironment variable to Sentry crash logging CURA-7050 --- cura_app.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cura_app.py b/cura_app.py index 218a63b24d..4909f1296d 100755 --- a/cura_app.py +++ b/cura_app.py @@ -23,7 +23,18 @@ parser.add_argument("--debug", ) known_args = vars(parser.parse_known_args()[0]) + +sentry_env = "production" +if ApplicationMetadata.CuraVersion == "master": + sentry_env = "development" +try: + if ApplicationMetadata.CuraVersion.split(".")[2] == "99": + sentry_env = "nightly" +except IndexError: + pass + sentry_sdk.init("https://5034bf0054fb4b889f82896326e79b13@sentry.io/1821564", + environment = sentry_env, release = "cura%s" % ApplicationMetadata.CuraVersion, default_integrations = False, max_breadcrumbs = 200)