Skip to content

Commit

Permalink
feat: Integrate sqlalchemy, redis and celery in sentry (#6473)
Browse files Browse the repository at this point in the history
  • Loading branch information
codedsun authored and iamareebjamal committed Oct 1, 2019
1 parent f09caa6 commit f8cdfdd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
import sys
from flask import Flask, json, make_response
from flask_celeryext import FlaskCeleryExt
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.redis import RedisIntegration
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration

from app.settings import get_settings, get_setts
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
Expand Down Expand Up @@ -42,8 +48,6 @@
from app.views.redis_store import redis_store
from app.views.celery_ import celery
from app.templates.flask_ext.jinja.filters import init_filters
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration


BASE_DIR = os.path.dirname(os.path.abspath(__file__))
Expand Down Expand Up @@ -173,7 +177,8 @@ def create_app():

# sentry
if not app_created and 'SENTRY_DSN' in app.config:
sentry_sdk.init(app.config['SENTRY_DSN'], integrations=[FlaskIntegration()])
sentry_sdk.init(app.config['SENTRY_DSN'], integrations=[FlaskIntegration(), RedisIntegration(),
CeleryIntegration(), SqlalchemyIntegration()])

# redis
redis_store.init_app(app)
Expand Down

0 comments on commit f8cdfdd

Please sign in to comment.