File tree Expand file tree Collapse file tree 5 files changed +19
-0
lines changed
sentry-kotlin-multiplatform/src
androidUnitTest/kotlin/io/sentry/kotlin/multiplatform
appleTest/kotlin/io/sentry/kotlin/multiplatform
commonMain/kotlin/io/sentry/kotlin/multiplatform
commonTest/kotlin/io/sentry/kotlin/multiplatform Expand file tree Collapse file tree 5 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ class SentryAndroidOptionsWrapper(private val androidOptions: SentryAndroidOptio
7373 override val sessionReplay: AndroidSentryReplayOptions
7474 get() = androidOptions.sessionReplay
7575
76+ override val sendDefaultPii: Boolean
77+ get() = androidOptions.isSendDefaultPii
78+
7679 override fun applyFromOptions (options : SentryOptions ) {
7780 options.toAndroidSentryOptionsCallback().invoke(androidOptions)
7881 }
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ open class SentryAppleOptionsWrapper(private val cocoaOptions: CocoaSentryOption
5454 override val diagnosticLevel: SentryLevel
5555 get() = cocoaOptions.diagnosticLevel.toKmpSentryLevel()!!
5656
57+ override val sendDefaultPii: Boolean
58+ get() = cocoaOptions.sendDefaultPii
59+
5760 override fun applyFromOptions (options : SentryOptions ) {
5861 options.toCocoaOptionsConfiguration().invoke(cocoaOptions)
5962 }
Original file line number Diff line number Diff line change @@ -191,6 +191,16 @@ public open class SentryOptions {
191191 */
192192 public var sessionReplay: SentryReplayOptions = SentryReplayOptions ()
193193
194+ /* *
195+ * Set this option to true to send default PII data to Sentry.
196+ * Among other things, enabling this will enable automatic IP address collection on events.
197+ *
198+ * For further details, refer to the documentation in the respective native SDKs:
199+ * - [Cocoa](https://docs.sentry.io/platforms/apple/data-management/data-collected/)
200+ * - [Android](https://docs.sentry.io/platforms/android/data-management/data-collected/)
201+ */
202+ public var sendDefaultPii: Boolean = false
203+
194204 /* *
195205 * Experimental options for new features, these options are going to be promoted to SentryOptions
196206 * before GA.
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ interface CommonPlatformOptions {
1414 val maxAttachmentSize: Long
1515 val sampleRate: Double?
1616 val tracesSampleRate: Double?
17+ val sendDefaultPii: Boolean
1718
1819 fun applyFromOptions (options : SentryOptions )
1920}
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ class SentryOptionsTest : BaseSentryTest() {
133133 assertTrue(options.sessionReplay.maskAllImages)
134134 assertEquals(SentryReplayOptions .Quality .MEDIUM , options.sessionReplay.quality)
135135 assertTrue(options.enableWatchdogTerminationTracking)
136+ assertFalse(options.sendDefaultPii)
136137 }
137138
138139 @Test
@@ -163,6 +164,7 @@ class SentryOptionsTest : BaseSentryTest() {
163164 sessionReplay.maskAllText = false
164165 sessionReplay.maskAllImages = false
165166 sessionReplay.quality = SentryReplayOptions .Quality .LOW
167+ sendDefaultPii = true
166168 }
167169
168170 val platformOptions = createPlatformOptions()
You can’t perform that action at this time.
0 commit comments