Skip to content

Commit

Permalink
Add Sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
elreplicante committed Jul 8, 2022
1 parent 79a4a66 commit 0063903
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function start:testing {
}

function start:local {
docker-compose -f docker-compose.yml -f docker-compose.local.yml --profile testing up --build "${@}"
docker-compose -f docker-compose.yml -f docker-compose.local.yml up --build "${@}"
}

function stop {
Expand Down
3 changes: 2 additions & 1 deletion src/QueueProcessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ def subscribe_to_extractions_tasks_queue(self):
if __name__ == "__main__":
try:
sentry_sdk.init(
os.environ.get('https://31f2bc6fdc8a4f36bb4e464ec1237765@o1134623.ingest.sentry.io/6212895'),
os.environ.get('SENTRY_OCR_DSN'),
traces_sample_rate=0.1,
environment=os.environ.get('ENVIRONMENT', 'development'),
integrations=[RedisIntegration()]
)
except Exception:
Expand Down
3 changes: 2 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@

try:
sentry_sdk.init(
os.environ.get('https://31f2bc6fdc8a4f36bb4e464ec1237765@o1134623.ingest.sentry.io/6212895'),
os.environ.get('SENTRY_OCR_DSN'),
traces_sample_rate=0.1,
environment=os.environ.get('ENVIRONMENT', 'development')
)
app.add_middleware(SentryAsgiMiddleware)
except Exception:
Expand Down

0 comments on commit 0063903

Please sign in to comment.