File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22The application setup and initialization code lives here
33"""
44
5- import os
6- import logging
75import json
6+ import logging
7+ import os
88
99import csh_ldap
1010import onesignal
11+ import sentry_sdk
1112from flask import Flask
1213from flask_gzip import Gzip
1314from flask_migrate import Migrate
1415from flask_pyoidc .flask_pyoidc import OIDCAuthentication
1516from flask_pyoidc .provider_configuration import ProviderConfiguration , ClientMetadata
1617from flask_sqlalchemy import SQLAlchemy
18+ from sentry_sdk .integrations .flask import FlaskIntegration
1719
1820app = Flask (__name__ )
1921gzip = Gzip (app )
6062# LDAP
6163_ldap = csh_ldap .CSHLDAP (app .config ['LDAP_BIND_DN' ], app .config ['LDAP_BIND_PASS' ])
6264
65+ # Sentry
66+ sentry_sdk .init (
67+ dsn = app .config ['SENTRY_DSN' ],
68+ integrations = [FlaskIntegration ()]
69+ )
70+
6371app .logger .info ('OIDCAuth and LDAP configured' )
6472
6573# pylint: disable=wrong-import-position
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ gunicorn~=19.7.1
1010csh_ldap ~= 2.1.0
1111onesignal-sdk ~= 1.0.0
1212pylint-quotes ~= 0.2.1
13+ sentry-sdk [flask ]== 0.13.1
You can’t perform that action at this time.
0 commit comments