Skip to content

ref(core): Remove deprecated IEnvelopeCache.store methods - #6468

Merged
adinauer merged 2 commits into
9.x.xfrom
ref/remove-deprecated-envelope-cache-store
Nov 12, 2026
Merged

adinauer merged 2 commits into
9.x.xfrom
ref/remove-deprecated-envelope-cache-store

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📜 Description

Removes both deprecated IEnvelopeCache.store(...) overloads for 9.0. storeEnvelope(SentryEnvelope, Hint) is now the interface's only abstract write method.

  • IEnvelopeCache: removes store(SentryEnvelope, Hint) and store(SentryEnvelope). storeEnvelope is no longer a default method.
  • EnvelopeCache, AndroidEnvelopeCache, NoOpEnvelopeCache: removes the store overrides. The private storeInternal/storeInternalAndroid helpers only existed so both entry points could share one body, so they are folded into storeEnvelope.
  • Tests that called store(...) or implemented it in custom caches now use storeEnvelope(...).

💡 Motivation and Context

#4575 (8.19.0) deprecated store in favor of storeEnvelope, which returns whether the envelope was written. But store stayed the abstract method, so the interface was the wrong way round:

  • A custom cache still had to implement the deprecated method.
  • The default storeEnvelope always returned true. AsyncHttpTransport uses that return value to decide whether an envelope counts as lost, so a cache that implemented only store reported every envelope as cached, even ones it never wrote.

No SDK production code calls store anymore. sentry-react-native already calls storeEnvelope in both its code and its tests.

Migration: custom IEnvelopeCache implementations rename store(envelope, hint) to storeEnvelope(envelope, hint) and return whether the envelope was stored.

💚 How did you test it?

  • :sentry:spotlessApply :sentry:apiDump ran.
  • These :sentry tests pass locally (283 tests): EnvelopeCacheTest, SentryTest, io.sentry.transport.*, OutboxSenderTest, EnvelopeSenderTest, MovePreviousSessionTest, PreviousSessionFinalizerTest.
  • I couldn't build sentry-android-core locally because the sandbox has no Android SDK. I removed the one store line from sentry-android-core.api by hand, so CI's API check and the Android unit tests are the verification for that module.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

  • Check Flutter and Capacitor for custom IEnvelopeCache implementations or store(...) calls. GitHub code search only turned up React Native, which is already migrated.
  • Add the rename to the 9.0 migration guide.

via alexander.dinauer.

--

View Session [Sentry]

sentry-junior Bot and others added 2 commits November 5, 2026 09:44
Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io>
Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io>
@sentry

sentry Bot commented Nov 5, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

@adinauer
adinauer marked this pull request as ready for review November 12, 2026 13:25
@adinauer
adinauer requested a review from a team as a code owner November 12, 2026 13:25
@adinauer
adinauer requested review from 0xadam-brown and romtsn and removed request for a team November 12, 2026 13:25
@adinauer
adinauer merged commit da410bc into 9.x.x Nov 12, 2026
38 of 39 checks passed
@adinauer
adinauer deleted the ref/remove-deprecated-envelope-cache-store branch November 12, 2026 13:25
adinauer added a commit to getsentry/sentry-docs that referenced this pull request Nov 12, 2026
## DESCRIBE YOUR PR

Document the removal of the deprecated `IEnvelopeCache.store(...)`
overloads in the Java and Android v8-to-v9 migration guides.

The guidance explains how custom cache implementations migrate to
`storeEnvelope(...)`, including its boolean result, and how to replace
calls to the removed single-argument overload.

This PR targets the `java-v9` collection branch so the migration
guidance publishes with SDK v9.

Refs getsentry/sentry-java#6468

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

Co-authored-by: Claude <noreply@anthropic.com>
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.

1 participant