Title: Please allow an option for asynchronous calls to capture_exception · Issue #1735 · getsentry/sentry-python · GitHub
Open Graph Title: Please allow an option for asynchronous calls to capture_exception · Issue #1735 · getsentry/sentry-python
X Title: Please allow an option for asynchronous calls to capture_exception · Issue #1735 · getsentry/sentry-python
Description: Problem Statement I have an asynchronous Python app which continual polls various rest api's with httpx Something like try: async with httpx.AsyncClient() as client: result = await client.post(url) # Do some processing on result except E...
Open Graph Description: Problem Statement I have an asynchronous Python app which continual polls various rest api's with httpx Something like try: async with httpx.AsyncClient() as client: result = await client.post(url)...
X Description: Problem Statement I have an asynchronous Python app which continual polls various rest api's with httpx Something like try: async with httpx.AsyncClient() as client: result = await client.post(...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/1735
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Please allow an option for asynchronous calls to capture_exception","articleBody":"### Problem Statement\n\nI have an asynchronous Python app which continual polls various rest api's with httpx\r\n\r\nSomething like\r\n```\r\ntry:\r\n async with httpx.AsyncClient() as client:\r\n result = await client.post(url)\r\n # Do some processing on result\r\n except Exception as exc:\r\n capture_exception(exc)\r\n logger.error(\"There was an error exc = {0}\".format(exc))\r\n```\r\n\r\nBecause my application is async and busy (polling lot's of APIs and getting data) the synchronous capture_exception call causes an issue because it blocks the applications only thread. This is made worse by the fact that an rest api may start returning errors on every call causing capture_exception to block a lot of things. \n\n### Solution Brainstorm\n\nIf there was an async version of capture_exception that would make life much better\r\n\r\neg\r\n```\r\ntry:\r\n async with httpx.AsyncClient() as client:\r\n result = await client.post(url)\r\n # Do some processing on result\r\n except Exception as exc:\r\n await capture_exception_async(exc)\r\n logger.error(\"There was an error exc = {0}\".format(exc))\r\n```\r\nWhile capture_exception_async other asynchronous tasks can still run. Is wasn't able to find anything on this by Googling so I assume it just does not exist at the moment.","author":{"url":"https://github.com/mlockett42","@type":"Person","name":"mlockett42"},"datePublished":"2022-11-11T10:05:49Z","url":"https://github.com/getsentry/sentry-python/issues/1735"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1c0f0e40-d920-a48d-4f68-26d602b31de6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B56A:3A347:2C2B3:3C482:6B00B790 |
| html-safe-nonce | 8de4afbf2de06d1ae45b65338d4c003ca8eb4d324db1776b547bf71a93639365 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTZBOjNBMzQ3OjJDMkIzOjNDNDgyOjZCMDBCNzkwIiwidmlzaXRvcl9pZCI6IjU4Mzg1MDA4MDA3NzQ1ODQyMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 71351d4799520d13d86c7c5312d95f34ebbe2fb394877518c6bb89bbb1a14485 |
| hovercard-subject-tag | issue:1445242211 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/1735/issue_layout |
| twitter:image | https://opengraph.githubassets.com/84fc26a3a39e4c75ac67bd2ac7641bb1548b9384af068d39dcf64f629f4b1253/getsentry/sentry-python/issues/1735 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/84fc26a3a39e4c75ac67bd2ac7641bb1548b9384af068d39dcf64f629f4b1253/getsentry/sentry-python/issues/1735 |
| og:image:alt | Problem Statement I have an asynchronous Python app which continual polls various rest api's with httpx Something like try: async with httpx.AsyncClient() as client: result = await client.post(url)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mlockett42 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1d07c25977adfc5ff6acb0a962a9bc168c07afbda6fef765f9761c350c2ae4a2 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5429cbfc6aca8c7b9a086a3c8f47400346f38cc9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width