diff --git a/upsonic_on_prem/dash/app/templates/base.html b/upsonic_on_prem/dash/app/templates/base.html index ce811070..3f661cdb 100644 --- a/upsonic_on_prem/dash/app/templates/base.html +++ b/upsonic_on_prem/dash/app/templates/base.html @@ -25,6 +25,42 @@ {% include 'in_page_load.js.html' %} + {% sentry as sentry %} + {% sentry_dsn as sentry_dsn %} + {% if sentry %} + + + + + + {% endif %} diff --git a/upsonic_on_prem/dash/app/templatetags/tags.py b/upsonic_on_prem/dash/app/templatetags/tags.py index 8145e17d..91f8605d 100644 --- a/upsonic_on_prem/dash/app/templatetags/tags.py +++ b/upsonic_on_prem/dash/app/templatetags/tags.py @@ -9,3 +9,14 @@ @register.simple_tag(name='debug_mode') def debug_mode(): return settings.DEBUG + + +@register.simple_tag(name='sentry') +def sentry(): + + return settings.sentry + +@register.simple_tag(name='sentry_dsn') +def sentry_dsn(): + + return settings.sentry_dsn \ No newline at end of file diff --git a/upsonic_on_prem/dash/dash/settings.py b/upsonic_on_prem/dash/dash/settings.py index 0fbcd11c..798e7aef 100644 --- a/upsonic_on_prem/dash/dash/settings.py +++ b/upsonic_on_prem/dash/dash/settings.py @@ -21,6 +21,7 @@ sentry = os.environ.get("sentry", "false").lower() == "true" sentry_django_key = os.environ.get("sentry_django_key", "https://1040c5057fc1ad3bd322a800edf1aed2@us.sentry.io/4506678631858176") +sentry_dsn = os.environ.get("sentry_dsn", "https://1040c5057fc1ad3bd322a800edf1aed2@o4506678585786368.ingest.sentry.io/4506678631858176") # settings.py if sentry: import sentry_sdk