Skip to content

Commit 9fce821

Browse files
authored
Add Sentry and update dependencies (#31)
2 parents f4651da + 7970175 commit 9fce821

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

config.env.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@
2626

2727
LDAP_BIND_DN = env.get("LDAP_BIND_DN", default="cn=selections2,ou=Apps,dc=csh,dc=rit,dc=edu")
2828
LDAP_BIND_PASS = env.get("LDAP_BIND_PASS", default=None)
29+
30+
# Sentry Config
31+
SENTRY_DSN = env.get("SENTRY_DSN", "")

requirements.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ alembic==0.9.9
33
asn1crypto==0.24.0
44
astroid==1.6.2
55
Beaker==1.9.0
6+
blinker==1.4
67
certifi==2018.1.18
7-
cffi==1.11.5
8+
cffi==1.14.0
89
chardet==3.0.4
910
click==6.7
1011
cryptography==2.3
@@ -25,7 +26,7 @@ Mako==1.0.7
2526
MarkupSafe==1.0
2627
mccabe==0.6.1
2728
oic==0.11.0.1
28-
Pillow==6.2.0
29+
Pillow==6.2.2
2930
pyasn1==0.4.2
3031
pyasn1-modules==0.2.1
3132
pycparser==2.18
@@ -42,7 +43,8 @@ python-ldap==3.0.0
4243
python-resize-image==1.1.11
4344
requests==2.20.0
4445
six==1.11.0
46+
sentry-sdk==0.14.3
4547
SQLAlchemy~=1.3.0
4648
urllib3==1.24.2
47-
Werkzeug==0.15.3
49+
Werkzeug==0.15.5
4850
wrapt==1.10.11

selections/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
from flask_migrate import Migrate
77
from flask_pyoidc.flask_pyoidc import OIDCAuthentication
88
from flask_sqlalchemy import SQLAlchemy
9+
import sentry_sdk
10+
from sentry_sdk.integrations.flask import FlaskIntegration
11+
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
912

1013
# Create the initial Flask Object
1114
app = Flask(__name__)
@@ -23,6 +26,11 @@
2326
_ldap = csh_ldap.CSHLDAP(
2427
app.config['LDAP_BIND_DN'], app.config['LDAP_BIND_PASS'])
2528

29+
# Sentry
30+
sentry_sdk.init(
31+
dsn=app.config['SENTRY_DSN'],
32+
integrations=[FlaskIntegration(), SqlalchemyIntegration()],
33+
)
2634

2735
# Initalize the SQLAlchemy object and add models.
2836
# Make sure that you run the migrate task before running.

0 commit comments

Comments
 (0)