Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to new sentry SDK for python #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxious
Copy link

@maxious maxious commented Apr 8, 2019

We started getting errors and sentry stopped reporting CKAN exceptions:

<urlopen error [Errno 104] Connection reset by peer> (url: https://sentry/api/2/store/)
Traceback (most recent call last):
  File "/usr/lib/ckan/default/lib64/python2.7/dist-packages/raven/transport/threaded.py", line 165, in send_sync
    super(ThreadedHTTPTransport, self).send(url, data, headers)
  File "/usr/lib/ckan/default/lib64/python2.7/dist-packages/raven/transport/http.py", line 43, in send
    ca_certs=self.ca_certs,
  File "/usr/lib/ckan/default/lib64/python2.7/dist-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/ckan/default/lib64/python2.7/dist-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1200, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 104] Connection reset by peer>

Upgrading from raven to the new sentry SDK for python https://github.com/getsentry/sentry-python resumed exceptions being reported.

@RemiDesgrange
Copy link

Can this PR be merged ? Thanks

@@ -1 +1 @@
raven==6.1.0
sentry-sdk==0.7.10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you bump it to 0.9

@@ -44,7 +45,9 @@ def make_error_log_middleware(self, app, config):
self._configure_logging(config)

log.debug('Adding Sentry middleware...')
return Sentry(app, config)
sentry_sdk.init(dsn=config.get('sentry.dsn'))
sentry = SentryWsgiMiddleware(app)
Copy link

@RemiDesgrange RemiDesgrange Jun 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does

sentry_sdk.init(
    dsn=config.get('sentry.dsn'),
    integrations=[FlaskIntegration(), RqIntegraton()]
)

not work ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants