Skip to content

Commit

Permalink
config: Set SENTRY_ENVIRONMENT to "test" and "acceptance" in relevant…
Browse files Browse the repository at this point in the history
… files so Sentry knows which environment it is running on
  • Loading branch information
drikusroor committed Apr 30, 2024
1 parent 69d75db commit 4ff612b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/podman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
AML_LOCATION_PROVIDER: ${{ vars.AML_LOCATION_PROVIDER }}
AML_SUBPATH: ${{ vars.AML_SUBPATH }}
DJANGO_SETTINGS_MODULE: ${{ vars.DJANGO_SETTINGS_MODULE }}
SENTRY_ENVIRONMENT: "test"
SQL_DATABASE: ${{ vars.SQL_DATABASE }}
SQL_HOST: ${{ vars.SQL_HOST }}
SQL_PORT: ${{ vars.SQL_PORT }}
Expand Down Expand Up @@ -97,6 +98,7 @@ jobs:
AML_LOCATION_PROVIDER: ${{ vars.AML_LOCATION_PROVIDER }}
AML_SUBPATH: ${{ vars.AML_SUBPATH }}
DJANGO_SETTINGS_MODULE: ${{ vars.DJANGO_SETTINGS_MODULE }}
SENTRY_ENVIRONMENT: "acceptance"
SQL_DATABASE: ${{ vars.SQL_DATABASE }}
SQL_HOST: ${{ vars.SQL_HOST }}
SQL_PORT: ${{ vars.SQL_PORT }}
Expand Down
2 changes: 2 additions & 0 deletions backend/aml/base_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
# of sampled transactions.
# We recommend adjusting this value in production.
profiles_sample_rate=0.2,
# Set environment
environment=os.getenv("SENTRY_ENVIRONMENT", "unknown"),
)
else:
logger.info("SENTRY_DSN is not defined. Skipping Sentry initialization.")
Expand Down
1 change: 1 addition & 0 deletions docker-compose-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ services:
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- SENTRY_DSN=${SENTRY_DSN}
- SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT}
- SQL_DATABASE=${SQL_DATABASE}
- SQL_USER=${SQL_USER}
- SQL_PASSWORD=${SQL_PASSWORD}
Expand Down

0 comments on commit 4ff612b

Please sign in to comment.