Skip to content

Commit 667edb2

Browse files
committed
Update maxAttachmentSize from 100MB to 200MB
Updates the maximum attachment size limit to align with the latest Sentry relay limits as documented in: https://develop.sentry.dev/sdk/data-model/envelopes/#size-limits Changes: - Increased maxAttachmentSize default from 100MB to 200MB - Updated documentation in SentryOptions.h - Updated unit tests in SentryOptionsTest.m This change supports the following envelope size limits: - 40MB for compressed envelope requests - 200MB for full envelope after decompression - 200MB for all attachments combined - 200MB for each individual attachment item Relates to: #6537
1 parent 324157f commit 667edb2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Sources/Sentry/Public/SentryOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ NS_SWIFT_NAME(Options)
253253

254254
/**
255255
* The maximum size for each attachment in bytes.
256-
* @note Default is 100 MiB (100 ✕ 1024 ✕ 1024 bytes).
256+
* @note Default is 200 MiB (200 ✕ 1024 ✕ 1024 bytes).
257257
* @note Please also check the maximum attachment size of relay to make sure your attachments don't
258258
* get discarded there:
259259
* https://docs.sentry.io/product/relay/options/

Sources/Sentry/SentryOptions.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ - (instancetype)init
6666
self.enableWatchdogTerminationTracking = YES;
6767
self.sessionTrackingIntervalMillis = [@30000 unsignedIntValue];
6868
self.attachStacktrace = YES;
69-
// Maximum attachment size is 100 MiB, matches Relay's limit:
69+
// Maximum attachment size is 200 MiB, matches Relay's limit:
7070
// https://develop.sentry.dev/sdk/data-model/envelopes/#size-limits
71-
self.maxAttachmentSize = 100 * 1024 * 1024;
71+
self.maxAttachmentSize = 200 * 1024 * 1024;
7272
self.sendDefaultPii = NO;
7373
self.enableAutoPerformanceTracing = YES;
7474
self.enablePersistingTracesWhenCrashing = NO;

Tests/SentryTests/SentryOptionsTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ - (void)assertDefaultValues:(SentryOptions *)options
686686
XCTAssertEqual(YES, options.enableWatchdogTerminationTracking);
687687
XCTAssertEqual([@30000 unsignedIntValue], options.sessionTrackingIntervalMillis);
688688
XCTAssertEqual(YES, options.attachStacktrace);
689-
XCTAssertEqual(100 * 1024 * 1024, options.maxAttachmentSize);
689+
XCTAssertEqual(200 * 1024 * 1024, options.maxAttachmentSize);
690690
XCTAssertEqual(NO, options.sendDefaultPii);
691691
XCTAssertTrue(options.enableAutoPerformanceTracing);
692692
#if SENTRY_HAS_UIKIT
@@ -805,7 +805,7 @@ - (void)testDefaultMaxAttachmentSize
805805
{
806806
SentryOptions *options = [self getValidOptions:@{}];
807807

808-
XCTAssertEqual(100 * 1024 * 1024, options.maxAttachmentSize);
808+
XCTAssertEqual(200 * 1024 * 1024, options.maxAttachmentSize);
809809
}
810810

811811
- (void)testSendDefaultPii

0 commit comments

Comments
 (0)