From 78ad6f52645ca3f30c245c685bfcba21279ba150 Mon Sep 17 00:00:00 2001 From: Sam Dudley Date: Thu, 3 Oct 2024 11:24:20 +0100 Subject: [PATCH] Fix elastic apm sentry issues --- config/settings/dev.py | 3 --- config/settings/paas.py | 2 -- config/settings/prod.py | 8 +++++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/config/settings/dev.py b/config/settings/dev.py index f671b17c..2da7d2d5 100644 --- a/config/settings/dev.py +++ b/config/settings/dev.py @@ -1,6 +1,3 @@ -import sentry_sdk -from sentry_sdk.integrations.django import DjangoIntegration - from .paas import * # noqa diff --git a/config/settings/paas.py b/config/settings/paas.py index d2783b53..95b53194 100644 --- a/config/settings/paas.py +++ b/config/settings/paas.py @@ -1,5 +1,3 @@ -import dj_database_url -from dbt_copilot_python.database import database_url_from_env from dbt_copilot_python.network import setup_allowed_hosts from dbt_copilot_python.utility import is_copilot diff --git a/config/settings/prod.py b/config/settings/prod.py index 4415299b..01a845ce 100644 --- a/config/settings/prod.py +++ b/config/settings/prod.py @@ -1,5 +1,4 @@ -import sentry_sdk -from sentry_sdk.integrations.django import DjangoIntegration +from dbt_copilot_python.utility import is_copilot from .paas import * # noqa @@ -14,10 +13,13 @@ ] INSTALLED_APPS += [ - "elasticapm.contrib.django", "django_audit_log_middleware", ] +# TODO: Remove once we have migrated to the DBT Platform. +if not is_copilot(): + INSTALLED_APPS += ["elasticapm.contrib.django"] + # X_ROBOTS_TAG (https://man.uktrade.io/docs/procedures/1st-go-live.html) X_ROBOTS_TAG = [ "noindex",