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

📈(monitoring) configure sentry monitoring #378

Merged
merged 1 commit into from
Sep 5, 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to

## [Unreleased]

### Added

- 📈(monitoring) configure sentry monitoring #378

### Fixed

- 🐛(dimail) improve handling of dimail errors on failed mailbox creation #377
Expand Down
5 changes: 5 additions & 0 deletions src/backend/people/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ def post_setup(cls):
environment=cls.__name__.lower(),
release=get_release(),
integrations=[DjangoIntegration()],
traces_sample_rate=1.0,
)
with sentry_sdk.configure_scope() as scope:
scope.set_extra("application", "backend")
Expand Down Expand Up @@ -654,6 +655,10 @@ class Production(Base):
},
},
}
SENTRY_DSN = values.Value(
"https://b72746c73d669421e7a8ccd3fab0fad2@sentry.incubateur.net/171",
environ_name="SENTRY_DSN",
)


class Feature(Production):
Expand Down
2 changes: 1 addition & 1 deletion src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies = [
"PyJWT==2.9.0",
"joserfc==1.0.0",
"requests==2.32.3",
"sentry-sdk==2.13.0",
"sentry-sdk[django]==2.13.0",
"url-normalize==1.4.3",
"whitenoise==6.7.0",
"mozilla-django-oidc==4.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/helm/env.d/dev/values.desk.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ backend:
POSTGRES_PASSWORD: pass
REDIS_URL: redis://default:pass@redis-master:6379/1
MAIL_PROVISIONING_API_URL: "http://host.docker.internal:8000"
SENTRY_DSN: "https://b72746c73d669421e7a8ccd3fab0fad2@sentry.incubateur.net/171"
command:
- "gunicorn"
- "-c"
Expand Down
1 change: 1 addition & 0 deletions src/helm/env.d/preprod/values.desk.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ backend:
key: url
MAIL_PROVISIONING_API_URL: "https://api.dev.ox.numerique.gouv.fr"
FEATURE_TEAMS: False
SENTRY_DSN: "https://b72746c73d669421e7a8ccd3fab0fad2@sentry.incubateur.net/171"

createsuperuser:
command:
Expand Down
1 change: 1 addition & 0 deletions src/helm/env.d/production/values.desk.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ backend:
key: url
MAIL_PROVISIONING_API_URL: "https://api.dev.ox.numerique.gouv.fr"
FEATURE_TEAMS: False
SENTRY_DSN: "https://b72746c73d669421e7a8ccd3fab0fad2@sentry.incubateur.net/171"

createsuperuser:
command:
Expand Down
2 changes: 1 addition & 1 deletion src/helm/env.d/staging/values.desk.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ backend:
name: redis.redis.libre.sh
key: url
MAIL_PROVISIONING_API_URL: "https://api.dev.ox.numerique.gouv.fr"

SENTRY_DSN: "https://b72746c73d669421e7a8ccd3fab0fad2@sentry.incubateur.net/171"

createsuperuser:
command:
Expand Down
Loading