Skip to content

Commit

Permalink
allow sentry init fail (#45)
Browse files Browse the repository at this point in the history
* allow sentry init fail

* update version
  • Loading branch information
LeoQuote authored Jul 22, 2021
1 parent 72d6b16 commit f04f832
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
31 changes: 17 additions & 14 deletions sa_tools_core/libs/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@

logger = logging.getLogger(__name__)

_client = Client(
dsn=SENTRY_DSN,
default_integrations=False,
integrations=[
ExcepthookIntegration(),
DedupeIntegration(),
StdlibIntegration(),
ModulesIntegration(),
ArgvIntegration(),
],
max_breadcrumbs=5,
attach_stacktrace=True,
)
_hub = Hub(_client)
try:
_client = Client(
dsn=SENTRY_DSN,
default_integrations=False,
integrations=[
ExcepthookIntegration(),
DedupeIntegration(),
StdlibIntegration(),
ModulesIntegration(),
ArgvIntegration(),
],
max_breadcrumbs=5,
attach_stacktrace=True,
)
_hub = Hub(_client)
except:
logger.exception('failed to load sentry: ')


def report(msg=None, **kw):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from io import open
from setuptools import setup, find_packages

version = '0.4.3'
version = '0.4.4'

requirements = [
'setuptools',
Expand Down

0 comments on commit f04f832

Please sign in to comment.