Title: Sentry is missing some of cron check-ins when used with sentry-python · Issue #2617 · getsentry/sentry-python · GitHub
Open Graph Title: Sentry is missing some of cron check-ins when used with sentry-python · Issue #2617 · getsentry/sentry-python
X Title: Sentry is missing some of cron check-ins when used with sentry-python · Issue #2617 · getsentry/sentry-python
Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce I'm using this task to send check-ins from airflow: def sentry_checkin(status: str, init_task_id: Optional[str] = None, **kwargs) -> str: sentry_logging = L...
Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce I'm using this task to send check-ins from airflow: def sentry_checkin(status: str, init_task_id: Optional[str] = No...
X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce I'm using this task to send check-ins from airflow: def sentry_checkin(status: str, init_task_id: Optional[str] ...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/2617
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sentry is missing some of cron check-ins when used with sentry-python","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n1.39.1\n\n### Steps to Reproduce\n\nI'm using this task to send check-ins from airflow:\r\n```python\r\ndef sentry_checkin(status: str, init_task_id: Optional[str] = None, **kwargs) -> str:\r\n sentry_logging = LoggingIntegration(\r\n level=logging.WARNING, # Capture warning and above as breadcrumbs\r\n event_level=logging.ERROR, # Send errors as events\r\n )\r\n sentry_sdk.init(\r\n environment=\"production\", dsn=MY_PROJECT, integrations=[sentry_logging]\r\n )\r\n check_in_id = None\r\n if init_task_id:\r\n ti = kwargs[\"ti\"]\r\n check_in_id = ti.xcom_pull(task_ids=init_task_id)\r\n return crons.capture_checkin(monitor_slug=\"my-monitor\", check_in_id=check_in_id, status=status)\r\n```\r\n\r\nI use this task in my airflow dag, it's set up to run on every execution: before the main logic, and after. It runs on every execution.\r\n\r\nI used to have celery and django integrations included because I needed them in the past. Removing them improved the results.\n\n### Expected Result\n\nAll check-ins to sentry are visible in the cron tab in sentry UI. There are no missed checkins when the tasks are working as expected.\r\n\r\nThe job runs every 10 minutes, I expect evenly spaced successful check-ins.\n\n### Actual Result\n\nBoth initial check-ins and completion check-ins may be missing from time to time. \r\n\r\nWith celery and django integrations the history of check-ins looks like this:\r\n\u003cimg width=\"1085\" alt=\"image\" src=\"https://github.com/getsentry/sentry-python/assets/5693175/f5cdd8af-4772-4fe6-885e-a3bf29a1c61c\">\r\n\r\nWithout celery and django integrations:\r\n\u003cimg width=\"1308\" alt=\"image\" src=\"https://github.com/getsentry/sentry-python/assets/5693175/38bccfb0-db4e-4e20-acb3-8164fee5f578\">\r\n","author":{"url":"https://github.com/IevgeniiB","@type":"Person","name":"IevgeniiB"},"datePublished":"2024-01-03T16:01:00Z","url":"https://github.com/getsentry/sentry-python/issues/2617"}
| 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:275848cf-ff95-7573-de24-df771d809092 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D150:1DB827:54EF74:755EB8:6B0094DF |
| html-safe-nonce | cd6456f62c721da73286050e96e0a65e971b658aa04b4ba1b0ffe3cae721d7d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTUwOjFEQjgyNzo1NEVGNzQ6NzU1RUI4OjZCMDA5NERGIiwidmlzaXRvcl9pZCI6IjMyMDIwNzkyNTY5MTM5NDE3MjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c33ff3feb67121f4e2cfca9a40fe53872adac89178285cbd04881e0fcc38cf10 |
| hovercard-subject-tag | issue:2064272873 |
| 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/2617/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1f06897d4061425cdef2b998838a7174909df7fe05e5d5f9f3f78a63974cd797/getsentry/sentry-python/issues/2617 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1f06897d4061425cdef2b998838a7174909df7fe05e5d5f9f3f78a63974cd797/getsentry/sentry-python/issues/2617 |
| og:image:alt | How do you use Sentry? Sentry Saas (sentry.io) Version 1.39.1 Steps to Reproduce I'm using this task to send check-ins from airflow: def sentry_checkin(status: str, init_task_id: Optional[str] = No... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | IevgeniiB |
| hostname | github.com |
| expected-hostname | github.com |
| None | 552480023d6963d7f188d82f8cd5f3fe5046244607d769b794462821d9ea1b29 |
| 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 | caf54e38b10face642f6cc1c79e4562e7ee52e3c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width