Title: On-demand flushing of offline transport · Issue #14746 · getsentry/sentry-javascript · GitHub
Open Graph Title: On-demand flushing of offline transport · Issue #14746 · getsentry/sentry-javascript
X Title: On-demand flushing of offline transport · Issue #14746 · getsentry/sentry-javascript
Description: Problem Statement Our web application is designed to be used offline and only periodically connected to the Internet to sync data. We used Sentry's old, deprecated Offline integration 1 to handle Sentry events; it knew when the app was c...
Open Graph Description: Problem Statement Our web application is designed to be used offline and only periodically connected to the Internet to sync data. We used Sentry's old, deprecated Offline integration 1 to handle S...
X Description: Problem Statement Our web application is designed to be used offline and only periodically connected to the Internet to sync data. We used Sentry's old, deprecated Offline integration 1 to hand...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/14746
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"On-demand flushing of offline transport","articleBody":"### Problem Statement\n\nOur web application is designed to be used offline and only periodically connected to the Internet to sync data. We used Sentry's old, deprecated Offline integration [^1] to handle Sentry events; it knew when the app was connected to the Internet, so it could sync on demand.\n\nThe new [offline transport](https://docs.sentry.io/platforms/javascript/guides/react/best-practices/offline-caching/) looks nice, but it apparently doesn't offer a way to flush on demand. I'm concerned that our users may not leave their apps connected to the Internet long enough for the (potentially) one hour retry delay to fire.\n\n[^1]: Technically, we used a fork of the Offline integration, where we implemented our own offline detection, due to limitations in the browser's standard feature.\n\n### Solution Brainstorm\n\nThe `{ send; flush }` object that [makeOfflineTransport](https://github.com/getsentry/sentry-javascript/blob/8.45.1/packages/core/src/transports/offline.ts#L52) returns could add a `flushNow` method that immediately starts processing the queue.\n\n```ts\n function flushNow(): void {\n flushIn(MIN_DELAY);\n retryDelay = START_DELAY;\n }\n```\n\nIf this approach seems reasonable, I can open a PR.","author":{"url":"https://github.com/joshkel","@type":"Person","name":"joshkel"},"datePublished":"2024-12-16T22:51:37Z","url":"https://github.com/getsentry/sentry-javascript/issues/14746"}
| 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:45e72203-f445-2d87-5187-703f097fb456 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E188:1739C:75A2A4:9B9876:6B04C8C1 |
| html-safe-nonce | f08b36216b8dceea66a3203ddd7af655b0a97a39d7248d18bfda8aca691fd3af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTg4OjE3MzlDOjc1QTJBNDo5Qjk4NzY6NkIwNEM4QzEiLCJ2aXNpdG9yX2lkIjoiNDc5MzgzMTE1OTQyOTkwODY3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 84c2f80557621853b6f92ee763311861be4e6f906e938c1c85830dd1b58c8770 |
| hovercard-subject-tag | issue:2743554366 |
| 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-javascript/14746/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3425a485c2b36c608dc55a77bf44ee7d820c1d7aff09803d4186fff47964dd5/getsentry/sentry-javascript/issues/14746 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3425a485c2b36c608dc55a77bf44ee7d820c1d7aff09803d4186fff47964dd5/getsentry/sentry-javascript/issues/14746 |
| og:image:alt | Problem Statement Our web application is designed to be used offline and only periodically connected to the Internet to sync data. We used Sentry's old, deprecated Offline integration 1 to handle S... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joshkel |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| 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 | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width