This commit is contained in:
31
src/app.py
Normal file
31
src/app.py
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
import logging
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.logging import LoggingIntegration
|
||||
import config
|
||||
|
||||
"""
|
||||
Main Entrypoint
|
||||
"""
|
||||
|
||||
__author__ = "@tormakris"
|
||||
__copyright__ = "Copyright 2020, Birbnetes Team"
|
||||
__module_name__ = "app"
|
||||
__version__text__ = "1"
|
||||
|
||||
sentry_logging = LoggingIntegration(
|
||||
level=logging.INFO,
|
||||
event_level=logging.ERROR
|
||||
)
|
||||
|
||||
if config.SENTRY_DSN:
|
||||
sentry_sdk.init(
|
||||
dsn=config.SENTRY_DSN,
|
||||
integrations=[sentry_logging],
|
||||
traces_sample_rate=1.0,
|
||||
send_default_pii=True,
|
||||
release=config.RELEASE_ID,
|
||||
environment=config.RELEASEMODE,
|
||||
_experiments={"auto_enabling_integrations": True}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user