We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
recordHttpBreadcrumbs
enableNetworkBreadcrumbs
1 parent f754e86 commit e964e2bCopy full SHA for e964e2b
CHANGELOG.md
@@ -1,5 +1,11 @@
1
# Changelog
2
3
+## Unreleased
4
+
5
+### Features
6
7
+- Use `recordHttpBreadcrumbs` to set iOS `enableNetworkBreadcrumbs` ([#1884](https://github.com/getsentry/sentry-dart/pull/1884))
8
9
## 7.16.1
10
11
### Fixes
dart/lib/src/sentry_options.dart
@@ -248,11 +248,13 @@ class SentryOptions {
248
/// - In an browser environment this can be requests which fail because of CORS.
249
/// - In an mobile or desktop application this can be requests which failed
250
/// because the connection was interrupted.
251
- /// Use with [SentryHttpClient] or `sentry_dio` integration for this to work
+ /// Use with [SentryHttpClient] or `sentry_dio` integration for this to work,
252
+ /// or iOS native where it sets the value to `enableCaptureFailedRequests`.
253
bool captureFailedRequests = true;
254
255
/// Whether to records requests as breadcrumbs. This is on by default.
- /// It only has an effect when the SentryHttpClient or dio integration is in use
256
+ /// It only has an effect when the SentryHttpClient or dio integration is in
257
+ /// use, or iOS native where it sets the value to `enableNetworkBreadcrumbs`.
258
bool recordHttpBreadcrumbs = true;
259
260
/// Whether [SentryEvent] deduplication is enabled.
flutter/example/ios/RunnerTests/SentryFlutterTests.swift
@@ -41,6 +41,7 @@ final class SentryFlutterTests: XCTestCase {
41
"enableWatchdogTerminationTracking": false,
42
"sendClientReports": false,
43
"maxAttachmentSize": NSNumber(value: 9004),
44
+ "recordHttpBreadcrumbs": false,
45
"captureFailedRequests": false,
46
"enableAppHangTracking": false,
47
"appHangTimeoutIntervalMillis": NSNumber(value: 10000)
@@ -65,6 +66,7 @@ final class SentryFlutterTests: XCTestCase {
65
66
XCTAssertEqual(false, fixture.options.enableWatchdogTerminationTracking)
67
XCTAssertEqual(false, fixture.options.sendClientReports)
68
XCTAssertEqual(9004, fixture.options.maxAttachmentSize)
69
+ XCTAssertEqual(false, fixture.options.enableNetworkBreadcrumbs)
70
XCTAssertEqual(false, fixture.options.enableCaptureFailedRequests)
71
XCTAssertEqual(false, fixture.options.enableAppHangTracking)
72
XCTAssertEqual(10, fixture.options.appHangTimeoutInterval)
flutter/ios/Classes/SentryFlutter.swift
@@ -58,6 +58,9 @@ public final class SentryFlutter {
58
if let maxAttachmentSize = data["maxAttachmentSize"] as? NSNumber {
59
options.maxAttachmentSize = maxAttachmentSize.uintValue
60
}
61
+ if let recordHttpBreadcrumbs = data["recordHttpBreadcrumbs"] as? Bool {
62
+ options.enableNetworkBreadcrumbs = recordHttpBreadcrumbs
63
+ }
64
if let captureFailedRequests = data["captureFailedRequests"] as? Bool {
options.enableCaptureFailedRequests = captureFailedRequests
flutter/lib/src/integrations/native_sdk_integration.dart
@@ -47,6 +47,7 @@ class NativeSdkIntegration implements Integration<SentryFlutterOptions> {
'sendClientReports': options.sendClientReports,
48
'proguardUuid': options.proguardUuid,
49
'maxAttachmentSize': options.maxAttachmentSize,
50
+ 'recordHttpBreadcrumbs': options.recordHttpBreadcrumbs,
51
'captureFailedRequests': options.captureFailedRequests,
52
'enableAppHangTracking': options.enableAppHangTracking,
53
'connectionTimeoutMillis': options.connectionTimeout.inMilliseconds,
flutter/test/integrations/init_native_sdk_integration_test.dart
@@ -58,6 +58,7 @@ void main() {
'sendClientReports': true,
'proguardUuid': null,
'maxAttachmentSize': 20 * 1024 * 1024,
+ 'recordHttpBreadcrumbs': true,
'captureFailedRequests': true,
'enableAppHangTracking': true,
'connectionTimeoutMillis': 5000,
@@ -98,6 +99,7 @@ void main() {
98
99
..enableNdkScopeSync = true
100
..proguardUuid = fakeProguardUuid
101
..maxAttachmentSize = 10
102
+ ..recordHttpBreadcrumbs = false
103
..captureFailedRequests = false
104
..enableAppHangTracking = false
105
..connectionTimeout = Duration(milliseconds: 9001)
@@ -141,6 +143,7 @@ void main() {
141
143
'sendClientReports': false,
142
144
'proguardUuid': fakeProguardUuid,
145
'maxAttachmentSize': 10,
146
+ 'recordHttpBreadcrumbs': false,
147
'captureFailedRequests': false,
148
'enableAppHangTracking': false,
149
'connectionTimeoutMillis': 9001,
0 commit comments