logging-fix
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
import sentry_sdk
|
||||
import logging
|
||||
from sentry_sdk.integrations.ariadne import AriadneIntegration
|
||||
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
||||
from sentry_sdk.integrations.starlette import StarletteIntegration
|
||||
from sentry_sdk.integrations.logging import LoggingIntegration
|
||||
from settings import GLITCHTIP_DSN
|
||||
|
||||
sentry_logging = LoggingIntegration(
|
||||
level=logging.DEBUG, # Capture info and above as breadcrumbs
|
||||
event_level=logging.ERROR # Send errors as events
|
||||
)
|
||||
|
||||
|
||||
def start_sentry():
|
||||
# sentry monitoring
|
||||
@@ -28,8 +21,7 @@ def start_sentry():
|
||||
integrations=[
|
||||
StarletteIntegration(),
|
||||
AriadneIntegration(),
|
||||
SqlalchemyIntegration(),
|
||||
sentry_logging
|
||||
SqlalchemyIntegration()
|
||||
],
|
||||
)
|
||||
except Exception as e:
|
||||
|
Reference in New Issue
Block a user