You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* collection: SDK Overhead Reduction
* perf(core): Skip java.specification.version lookup on Android
Android is never Java 9+, so the System.getProperty +
Double.valueOf parse in the Platform static initializer is
unnecessary overhead on the Android cold-start path.
Short-circuit to isJavaNinePlus=false when isAndroid is true.
* perf(android): Replace reflective OptionsContainer with direct subclass
Replace OptionsContainer.create(SentryAndroidOptions.class) which uses
getDeclaredConstructor().newInstance() with a direct
SentryAndroidOptionsContainer subclass that returns
new SentryAndroidOptions() without reflection.
Make OptionsContainer non-final (@OPEN) with a protected no-arg
constructor so Android can subclass it.
* collection: SDK Overhead reduction for JVM
* perf(core): Short-circuit combined scope breadcrumbs
Avoid allocating and sorting a merged breadcrumb queue when only one component scope has breadcrumbs. This keeps the full merge path for multi-scope breadcrumbs and returns the default write scope queue when all scopes are empty.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Reduce envelope writer buffer size
Use an explicit 512-character BufferedWriter buffer for envelope item and envelope serialization. This avoids allocating the oversized default char buffer for each short-lived serialization writer while preserving the existing OutputStreamWriter-based encoding path.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* perf(core): Remove redundant event map copies
Avoid creating temporary maps when applying scope and options tags or scope extras. The event setters already copy these maps, so this preserves snapshot semantics while reducing allocation overhead.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* changelog
* perf(core): Short-circuit combined scope collections
Avoid allocating merged collection copies when only one combined scope contains values. This extends the breadcrumbs optimization to tags, attributes, extras, and attachments while preserving merge behavior when multiple scopes contribute data.
Co-Authored-By: Claude <noreply@anthropic.com>
* changelog
* perf(android): Use TimeZone.getDefault for device timezone
Avoid constructing a Calendar only to read the default device timezone. The locale passed to Calendar does not affect the timezone value, so TimeZone.getDefault returns the same value with less work during device context collection.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Replace Calendar with Date in DateUtils
Avoid constructing Calendar instances when DateUtils only needs the current epoch millis or a Date for an existing millis value. Date stores epoch millis without timezone state, so the returned values are unchanged while avoiding unnecessary Calendar allocation and field computation.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Reduce JsonWriter stack allocation
Shrink the vendored JsonWriter nesting stack from 32 entries to 8 entries. The stack still grows on demand for deeply nested payloads, while common SDK serialization avoids the larger initial array allocation.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Lazily allocate Breadcrumb data
Avoid allocating a ConcurrentHashMap for breadcrumbs that never set data. Initialize the data map on first write while preserving concurrent writes with double-checked locking.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Reduce context serialization allocations
Use sorted key arrays when serializing contexts to avoid allocating an ArrayList for each serialization. This preserves deterministic key ordering while keeping the snapshot representation smaller.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Lazily allocate reflection serializer state
Defer creation of the reflection serializer visiting set until reflection serialization is actually needed. Normal SDK payload serialization uses explicit serializers, so this avoids an unused HashSet allocation for each writer.
* perf(core): Lazily create reflection JSON serializer
Defer creation of JsonReflectionObjectSerializer until unknown-object reflection serialization is needed. Normal SDK payloads use explicit serializers, so this avoids allocating unused reflection serializer state for each writer.
* fix(android): Preserve locale timezone extension
Keep the Calendar-based timezone path for Android 13+ locales that carry a Unicode tz extension. This preserves the existing device timezone behavior while keeping the direct default timezone fast path for normal locales.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Replace ISO8601 timestamp handling
Replace the Calendar-backed vendored ISO8601 formatting and parsing path with a small Sentry-specific utility that works directly from epoch milliseconds.
This avoids formatter and parser allocations on timestamp-heavy serialization paths while keeping the existing DateUtils API as the facade.
Co-Authored-By: Claude <noreply@anthropic.com>
* ref(core): Move ISO8601 utility to vendor package
Move the Sentry ISO8601 helper under the vendor package and mark it as internal API so the adapted public-domain date conversion code is isolated from core SDK classes.
Update attribution metadata to reflect the public-domain dedication source.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(core): Avoid cloning Date getters
* fix(core): Preserve ISO8601 utility compatibility
Match edge-case behavior from the previous vendored ISO8601 utility for date-only timestamps, trailing characters after Z, and Gregorian cutover dates.
* fix(core): Preserve mutable breadcrumb data access
Initialize the lazy breadcrumb data map when callers request the full map. This keeps getData() mutable for existing callers while preserving lazy allocation for breadcrumbs that only serialize or read individual values.
Co-Authored-By: Claude <noreply@anthropic.com>
* docs(android): Explain timezone Calendar fallback
Document why Android 13+ locales with Unicode timezone extensions keep using Calendar while normal locales use the default timezone directly for performance.
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(core): Avoid KeySetView in context serialization
Use ConcurrentHashMap.keys() when creating sorted context key snapshots so the serialization path stays compatible with Android API 21. Keep the array snapshot optimization without relying on KeySetView, which AnimalSniffer rejects for the SDK's minSdk.
Co-Authored-By: Claude <noreply@anthropic.com>
* test(core): Add breadcrumb timestamp serialization coverage
Cover that breadcrumbs backed by timestamp milliseconds serialize the same timestamp as breadcrumbs backed by Date for the same instant.
* fix(core): Parse date-only timestamps with timezones
Preserve ISO8601 parser compatibility for date-only values that include a timezone suffix. Keep modern date-only timezone parsing on the fast path and add parity coverage against the previous parser.
* docs(core): Add timezone changelog entry
* docs(core): Add DateUtils changelog entry
* docs(core): Add JsonWriter changelog entry
* docs(core): Add breadcrumb changelog entry
* docs(core): Add contexts changelog entry
* docs(core): Add reflection state changelog entry
* docs(core): Add reflection serializer changelog entry
* docs(core): Add ISO8601 handling changelog entry
* docs(core): Add Date getter changelog entries
* changelog
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,31 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
### Behavioral Changes
6
+
7
+
- Collections returned by scope (e.g. `getBreadcrumbs`, `getTags`, `getAttachments`) are shared state and should not be mutated. ([#5541](https://github.com/getsentry/sentry-java/pull/5541))
8
+
- Previously, when going through `CombinedScopeView`, we were returning a copy where mutations didn't show up in the underlying scopes.
9
+
- This has now changed in order to reduce SDK overhead.
10
+
- `Date` objects returned by SDK data model getters are shared state and should not be mutated. ([#5603](https://github.com/getsentry/sentry-java/pull/5603))
11
+
- Previously, these getters returned defensive copies for some date fields.
12
+
- This has now changed in order to reduce SDK overhead.
13
+
14
+
### Performance
15
+
16
+
- Reduce writer buffer size from 8192 to 512 ([#5544](https://github.com/getsentry/sentry-java/pull/5544))
- Optimize combined scope by adding an early return if only one scope has data ([#5541](https://github.com/getsentry/sentry-java/pull/5541))
19
+
- Reduce model access overhead by avoiding defensive `Date` copies in SDK data model getters. ([#5603](https://github.com/getsentry/sentry-java/pull/5603))
20
+
- Reduce timestamp parsing and formatting overhead with Sentry-specific ISO-8601 handling. ([#5602](https://github.com/getsentry/sentry-java/pull/5602))
21
+
- Reduce JSON serialization overhead by creating the reflection serializer only when unknown-object fallback serialization is needed. ([#5601](https://github.com/getsentry/sentry-java/pull/5601))
22
+
- Reduce JSON serialization overhead by allocating reflection cycle-tracking state only when reflection serialization is used. ([#5600](https://github.com/getsentry/sentry-java/pull/5600))
23
+
- Reduce context serialization overhead by sorting key snapshots with arrays instead of temporary lists. ([#5599](https://github.com/getsentry/sentry-java/pull/5599))
24
+
- Reduce breadcrumb allocation overhead by creating the `Breadcrumb` data map only when data is added. ([#5598](https://github.com/getsentry/sentry-java/pull/5598))
25
+
- Reduce JSON serialization overhead by lowering the initial `JsonWriter` nesting stack size while preserving on-demand growth. ([#5591](https://github.com/getsentry/sentry-java/pull/5591))
26
+
- Reduce timestamp helper overhead by replacing unnecessary `Calendar` usage in `DateUtils` with direct `Date` creation. ([#5589](https://github.com/getsentry/sentry-java/pull/5589))
27
+
- Reduce Android startup overhead by using the default timezone directly on older devices or when no timezone info is available in the locale. ([#5587](https://github.com/getsentry/sentry-java/pull/5587))
**Copyright:** None; public domain dedication by Howard Hinnant
70
+
71
+
### Scope
72
+
73
+
The Sentry Java SDK includes adapted civil date conversion algorithms from Howard Hinnant's date algorithms for UTC ISO 8601 timestamp parsing and formatting. The code resides in `io.sentry.vendor.SentryIso8601Utils`.
74
+
75
+
```
76
+
Consider these donated to the public domain.
77
+
```
78
+
79
+
---
80
+
65
81
## Android Open Source Project — Base64 (Apache 2.0)
0 commit comments