Skip to content

Add consent-aware offline caching#1341

Merged
tustanivsky merged 3 commits into
mainfrom
feat/consent-aware-caching
Apr 28, 2026
Merged

Add consent-aware offline caching#1341
tustanivsky merged 3 commits into
mainfrom
feat/consent-aware-caching

Conversation

@tustanivsky

Copy link
Copy Markdown
Collaborator

This PR enables HTTP retries unconditionally during SDK initialization on all sentry-native platforms where HTTP transport is used

It is required for consent-aware offline caching (getsentry/sentry-native#1542) - when consent is revoked and offline caching is enabled, envelopes are cached to disk. Once consent is granted again, triggers the retry system to immediately flush cached envelopes.

Closes #1103

Depends on:

@github-actions

github-actions Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Prevent potential script injection in crash-reporter-build workflow by fix-it-felix-sentry in #1324

Internal Changes 🔧

Deps

  • Update Native SDK to v0.13.6 by github-actions in #1339
  • Update Android Gradle Plugin to v6.4.0 by github-actions in #1338
  • Update Cocoa SDK to v9.10.0 by github-actions in #1335
  • Update Java SDK to v8.38.0 by github-actions in #1336
  • Update Native SDK to v0.13.5 by github-actions in #1334
  • Update Cocoa SDK to v9.9.0 by github-actions in #1332
  • Update CLI to v3.3.5 by github-actions in #1323

Other

  • Update validate-pr workflow by stephanie-anderson in #1328

Other

  • Add consent-aware offline caching by tustanivsky in #1341
  • Fix intermittent crash when capturing screenshots due to invalid viewport by tustanivsky in #1331
  • Suppress superfluous warnings when detecting for SteamOS by yangskyboxlabs in #1326
  • Add out-of-process screenshot capturing on Windows by tustanivsky in #1325

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 7af3288

@tustanivsky tustanivsky marked this pull request as ready for review April 28, 2026 08:10
@tustanivsky tustanivsky requested review from jpnurmi and mujacica April 28, 2026 08:27
sentry_options_set_logs_with_attributes(options, true);
sentry_options_set_enable_metrics(options, settings->EnableMetrics);
sentry_options_set_before_send_metric(options, HandleBeforeMetric, this);
sentry_options_set_http_retry(options, 1);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Makes perfect sense because this brings the Native platforms on par with the Android and Cocoa siblings that have unconfigurable retries. 👍

@tustanivsky tustanivsky merged commit a6ecbfe into main Apr 28, 2026
74 checks passed
@tustanivsky tustanivsky deleted the feat/consent-aware-caching branch April 28, 2026 08:38
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.

Allow sentry to init in "offline mode" so it doesn't communicate with the internet

2 participants