Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config.env.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
ONESIGNAL_INTRO_APP_AUTH_KEY = environ.get("PACKET_ONESIGNAL_INTRO_APP_AUTH_KEY", None)
ONESIGNAL_INTRO_APP_ID = environ.get("PACKET_ONESIGNAL_INTRO_APP_ID", "6eff123a-0852-4027-804e-723044756f00")

# Sentry Config
SENTRY_DSN = environ.get("PACKET_SENTRY_DSN", "")

# Slack URL for pushing to #general
SLACK_WEBHOOK_URL = environ.get("PACKET_SLACK_URL", None)

Expand Down
13 changes: 11 additions & 2 deletions packet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
The application setup and initialization code lives here
"""

import os
import logging
import json
import logging
import os

import csh_ldap
import onesignal
Expand All @@ -15,6 +15,9 @@
from flask_pyoidc.provider_configuration import ProviderConfiguration, ClientMetadata
from flask_sqlalchemy import SQLAlchemy

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration

app = Flask(__name__)
gzip = Gzip(app)

Expand Down Expand Up @@ -60,6 +63,12 @@
# LDAP
_ldap = csh_ldap.CSHLDAP(app.config['LDAP_BIND_DN'], app.config['LDAP_BIND_PASS'])

# Sentry
sentry_sdk.init(
dsn=app.config['SENTRY_DSN'],
integrations=[FlaskIntegration()]
)

app.logger.info('OIDCAuth and LDAP configured')

# pylint: disable=wrong-import-position
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ gunicorn~=19.7.1
csh_ldap~=2.1.0
onesignal-sdk~=1.0.0
pylint-quotes~=0.2.1
sentry-sdk[flask]==0.13.1