diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-19 11:45:35 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-19 11:45:35 +0300 |
commit | 8dc6e7a38670d81e919d4b3a817834308d6029b0 (patch) | |
tree | 3f3b7f0e28a2aac7959ac93d1e0ea1184b9c9342 /cura_app.py | |
parent | 4de28bed28ac94d0b72222e9f84d0dbe1c09f11f (diff) |
Add encvironment variable to Sentry crash logging
CURA-7050
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 11 |
1 files changed, 11 insertions, 0 deletions
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) |