File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 4646ONESIGNAL_INTRO_APP_AUTH_KEY = environ .get ("PACKET_ONESIGNAL_INTRO_APP_AUTH_KEY" , None )
4747ONESIGNAL_INTRO_APP_ID = environ .get ("PACKET_ONESIGNAL_INTRO_APP_ID" , "6eff123a-0852-4027-804e-723044756f00" )
4848
49+ # Sentry Config
50+ SENTRY_DSN = environ .get ("PACKET_SENTRY_DSN" , "" )
51+
4952# Slack URL for pushing to #general
5053SLACK_WEBHOOK_URL = environ .get ("PACKET_SLACK_URL" , None )
5154
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
1515from flask_pyoidc .provider_configuration import ProviderConfiguration , ClientMetadata
1616from flask_sqlalchemy import SQLAlchemy
1717
18+ import sentry_sdk
19+ from sentry_sdk .integrations .flask import FlaskIntegration
20+
1821app = Flask (__name__ )
1922gzip = Gzip (app )
2023
6063# LDAP
6164_ldap = csh_ldap .CSHLDAP (app .config ['LDAP_BIND_DN' ], app .config ['LDAP_BIND_PASS' ])
6265
66+ # Sentry
67+ sentry_sdk .init (
68+ dsn = app .config ['SENTRY_DSN' ],
69+ integrations = [FlaskIntegration ()]
70+ )
71+
6372app .logger .info ('OIDCAuth and LDAP configured' )
6473
6574# 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