Skip to content

Commit

Permalink
update sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak committed Sep 15, 2023
1 parent aaca569 commit a416acc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
8 changes: 8 additions & 0 deletions aws/backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@
{
"name": "FIDELIUS_URL",
"value": "https://fidelius.ohc.network"
},
{
"name": "SENTRY_TRACES_SAMPLE_RATE",
"value": "1.0"
},
{
"name": "SENTRY_PROFILES_SAMPLE_RATE",
"value": "1.0"
}
],
"repositoryCredentials": {
Expand Down
16 changes: 16 additions & 0 deletions aws/celery.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@
{
"name": "FIDELIUS_URL",
"value": "https://fidelius.ohc.network"
},
{
"name": "SENTRY_TRACES_SAMPLE_RATE",
"value": "1.0"
},
{
"name": "SENTRY_PROFILES_SAMPLE_RATE",
"value": "1.0"
}
],
"repositoryCredentials": {
Expand Down Expand Up @@ -358,6 +366,14 @@
{
"name": "FIDELIUS_URL",
"value": "https://fidelius.ohc.network"
},
{
"name": "SENTRY_TRACES_SAMPLE_RATE",
"value": "1.0"
},
{
"name": "SENTRY_PROFILES_SAMPLE_RATE",
"value": "1.0"
}
],
"repositoryCredentials": {
Expand Down
10 changes: 4 additions & 6 deletions config/settings/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,12 @@
sentry_sdk.init(
dsn=SENTRY_DSN,
environment=env("SENTRY_ENVIRONMENT", default="deployment-unknown"),
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=1.0),
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0),
profiles_sample_rate=env.float("SENTRY_PROFILES_SAMPLE_RATE", default=0),
integrations=[
LoggingIntegration(
level=env.int("DJANGO_SENTRY_LOG_LEVEL", logging.INFO),
event_level=logging.ERROR, # Capture info and above as breadcrumbs # Send errors as events
),
LoggingIntegration(event_level=logging.WARNING),
DjangoIntegration(),
CeleryIntegration(),
CeleryIntegration(monitor_beat_tasks=True),
RedisIntegration(),
],
)
Expand Down

0 comments on commit a416acc

Please sign in to comment.