Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Conversation

asvetlov
Copy link
Contributor

The transport sends sentry messages asynchronously in separate asyncio task.
But it requires started asyncio event loop.
Works on Python 3.3+
Dependencies: tulip (for Python 3.3) and aiohttp library.

@asvetlov
Copy link
Contributor Author

I see some errors on Travis like

=================================== FAILURES  ===================================
_______________________ DjangoClientTest.test_user_info ________________________
tests/contrib/django/tests.py:189: in test_user_info
>       assert 'user' in event
E       AssertionError: assert 'user' in {'culprit': 'tests.contrib.django.views in raise_exc', 'event_id': '0326a3d8026044399a23c21af2403122', 'exception': {'...ravis/virtualenv/pypy-2.2.1/bin/py.test'", "'tests/'", "'--cov'", "'raven'", "'--cov-report'", "'term-missing'")}, ...}

But the errors definitely are not related to my changes

@asvetlov
Copy link
Contributor Author

@dcramer would you like to include asyncio/aiohttp transport into raven?
I've tested it locally and the code works good.
This week I'll start to use aiohttp transport in our products btw.

Copy link
Member

Choose a reason for hiding this comment

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

the comment about tornado is wrong, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@asvetlov
Copy link
Contributor Author

@dcramer I've fixed the doc and added more verbose response error handling.
Also now aiohttp transport supports HTTP keepalives. Does sentry server process it?

Also please describe what should I do with AioHttpTransport? What code is obsolete?

@asvetlov
Copy link
Contributor Author

@dcramer I've fixed all your notes.

@dcramer
Copy link
Member

dcramer commented Jun 26, 2014

Thanks!

dcramer added a commit that referenced this pull request Jun 26, 2014
Add asyncio aiohttp transport for raven-python
@dcramer dcramer merged commit 133fcdb into getsentry:master Jun 26, 2014
@asvetlov
Copy link
Contributor Author

Thank you too!

@asvetlov
Copy link
Contributor Author

@dcramer when do you want to publish release with aiohttp transport?

Choose a reason for hiding this comment

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

@asvetlov, there is a typo -- aiohttp.TCPConnector missing loop argument.

Also family argument in __init__ never used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Looks good

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

Successfully merging this pull request may close these issues.

5 participants