Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change sentry dsn env var to avoid datahub telemetry clash #374

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ DJANGO_LOG_LEVEL=INFO
CATALOGUE_TOKEN=mycatalogtoken
CATALOGUE_URL=https://datahub-catalogue-dev.apps.live.cloud-platform.service.justice.gov.uk/api/gms

# Sentry Variables
SENTRY_DSN_WORKAROUND=< obtain from onepassword >

# Azure Variables (Examples)
AZURE_AUTH_ENABLED=true # any string value other than true to disable Azure authentication
AZURE_CLIENT_ID=< obtain from onepassword >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
DEBUG: ${{ vars.DEBUG }}
DJANGO_ALLOWED_HOSTS: ${{ vars.DJANGO_ALLOWED_HOSTS }}
DJANGO_LOG_LEVEL: ${{ vars.DJANGO_LOG_LEVEL }}
SENTRY_DSN: ${{ vars.SENTRY_DSN }}
SENTRY_DSN_WORKAROUND: ${{ vars.SENTRY_DSN_WORKAROUND }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
CATALOGUE_TOKEN: ${{ secrets.CATALOGUE_TOKEN }}
IMAGE_TAG: ${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

# Sentry Configuration
sentry_sdk.init(
dsn=os.environ.get("SENTRY_DSN"),
dsn=os.environ.get("SENTRY_DSN_WORKAROUND"), # Datahub overwrites with this variable unless it is renamed, causing Sentry to tag issues with the incorrect environment
enable_tracing=True,
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
Expand Down
4 changes: 2 additions & 2 deletions deployments/templates/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ spec:
value: "${DJANGO_ALLOWED_HOSTS}"
- name: DJANGO_LOG_LEVEL
value: "${DJANGO_LOG_LEVEL}"
- name: SENTRY_DSN
value: "${SENTRY_DSN}"
- name: SENTRY_DSN_WORKAROUND
value: "${SENTRY_DSN_WORKAROUND}"
- name: ENABLE_ANALYTICS
value: "${ENABLE_ANALYTICS}"
- name: ANALYTICS_ID
Expand Down
Loading