add sentry support
Change-Id: Iaf91e66524fbf3d6c3ed248477084ebffa616a51
This commit is contained in:
parent
84bc653862
commit
29b73d2d50
@ -16,12 +16,27 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
|
import pkg_resources
|
||||||
|
|
||||||
|
import sentry_sdk
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
|
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||||
|
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
||||||
|
|
||||||
from atmosphere import models
|
from atmosphere import models
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = pkg_resources.get_distribution("atmosphere").version
|
||||||
|
|
||||||
|
sentry_sdk.init(
|
||||||
|
release="atmosphere@%s" % VERSION,
|
||||||
|
integrations=[
|
||||||
|
FlaskIntegration(),
|
||||||
|
SqlalchemyIntegration()
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def create_app(config=None):
|
def create_app(config=None):
|
||||||
"""create_app"""
|
"""create_app"""
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
@ -5,3 +5,4 @@ Flask-SQLAlchemy
|
|||||||
keystonemiddleware
|
keystonemiddleware
|
||||||
python-dateutil
|
python-dateutil
|
||||||
PyMySQL
|
PyMySQL
|
||||||
|
sentry-sdk[flask]
|
Loading…
x
Reference in New Issue
Block a user