add sentry
This commit is contained in:
3
db.py
3
db.py
@@ -1,8 +1,9 @@
|
|||||||
from sqlalchemy import create_engine
|
from sqlalchemy import create_engine
|
||||||
from config import user1, pass1
|
from config import user1, pass1
|
||||||
from sqlalchemy.orm import sessionmaker
|
from sqlalchemy.orm import sessionmaker
|
||||||
|
import os
|
||||||
|
|
||||||
|
# DB_URL = os.getenv("DB_URL")
|
||||||
DB_URL = "mysql+mysqlconnector://"+user1+":"+pass1+"@localhost:3306/prout"
|
DB_URL = "mysql+mysqlconnector://"+user1+":"+pass1+"@localhost:3306/prout"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
main.py
10
main.py
@@ -5,10 +5,18 @@ from controllers import App
|
|||||||
from views import View
|
from views import View
|
||||||
from authentication import PasswordTools
|
from authentication import PasswordTools
|
||||||
|
|
||||||
|
import sentry_sdk
|
||||||
|
import config
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
sentry_sdk.init(
|
||||||
|
dsn=config.sentry_url,
|
||||||
|
# Add data like request headers and IP for users,
|
||||||
|
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
|
||||||
|
send_default_pii=True,
|
||||||
|
)
|
||||||
|
|
||||||
view = View()
|
view = View()
|
||||||
collaborator_tools = tools.CollaboratorTools(session)
|
collaborator_tools = tools.CollaboratorTools(session)
|
||||||
customer_tools = tools.CustomerTools(session)
|
customer_tools = tools.CustomerTools(session)
|
||||||
|
|||||||
Reference in New Issue
Block a user