File tree Expand file tree Collapse file tree 11 files changed +36
-1
lines changed
sentry-kotlin-multiplatform
androidUnitTest/kotlin/io/sentry/kotlin/multiplatform
appleMain/kotlin/io/sentry/kotlin/multiplatform/extensions
appleTest/kotlin/io/sentry/kotlin/multiplatform
commonJvmMain/kotlin/io/sentry/kotlin/multiplatform/extensions
commonMain/kotlin/io/sentry/kotlin/multiplatform
commonTest/kotlin/io/sentry/kotlin/multiplatform
jvmTest/kotlin/io/sentry/kotlin/multiplatform Expand file tree Collapse file tree 11 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Features
6
+
7
+ - Add ` sendDefaultPii ` option ([ #377 ] ( https://github.com/getsentry/sentry-kotlin-multiplatform/pull/377 ) )
8
+
5
9
### Dependencies
6
10
7
11
- Bump Java SDK from v8.8.0 to v8.9.0 ([ #375 ] ( https://github.com/getsentry/sentry-kotlin-multiplatform/pull/375 ) )
13
17
14
18
## 0.12.0
15
19
16
- ### Feature
20
+ ### Features
17
21
18
22
- Move replay options out of experimental ([ #367 ] ( https://github.com/getsentry/sentry-kotlin-multiplatform/pull/367 ) )
19
23
- You can now access the replay options via ` options.sessionReplay `
Original file line number Diff line number Diff line change @@ -185,6 +185,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
185
185
public final fun getRelease ()Ljava/lang/String;
186
186
public final fun getSampleRate ()Ljava/lang/Double;
187
187
public final fun getSdk ()Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;
188
+ public final fun getSendDefaultPii ()Z
188
189
public final fun getSessionReplay ()Lio/sentry/kotlin/multiplatform/SentryReplayOptions;
189
190
public final fun getSessionTrackingIntervalMillis ()J
190
191
public final fun getTracesSampleRate ()Ljava/lang/Double;
@@ -214,6 +215,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
214
215
public final fun setRelease (Ljava/lang/String;)V
215
216
public final fun setSampleRate (Ljava/lang/Double;)V
216
217
public final fun setSdk (Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;)V
218
+ public final fun setSendDefaultPii (Z)V
217
219
public final fun setSessionReplay (Lio/sentry/kotlin/multiplatform/SentryReplayOptions;)V
218
220
public final fun setSessionTrackingIntervalMillis (J)V
219
221
public final fun setTracesSampleRate (Ljava/lang/Double;)V
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
182
182
public final fun getRelease ()Ljava/lang/String;
183
183
public final fun getSampleRate ()Ljava/lang/Double;
184
184
public final fun getSdk ()Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;
185
+ public final fun getSendDefaultPii ()Z
185
186
public final fun getSessionReplay ()Lio/sentry/kotlin/multiplatform/SentryReplayOptions;
186
187
public final fun getSessionTrackingIntervalMillis ()J
187
188
public final fun getTracesSampleRate ()Ljava/lang/Double;
@@ -211,6 +212,7 @@ public class io/sentry/kotlin/multiplatform/SentryOptions {
211
212
public final fun setRelease (Ljava/lang/String;)V
212
213
public final fun setSampleRate (Ljava/lang/Double;)V
213
214
public final fun setSdk (Lio/sentry/kotlin/multiplatform/protocol/SdkVersion;)V
215
+ public final fun setSendDefaultPii (Z)V
214
216
public final fun setSessionReplay (Lio/sentry/kotlin/multiplatform/SentryReplayOptions;)V
215
217
public final fun setSessionTrackingIntervalMillis (J)V
216
218
public final fun setTracesSampleRate (Ljava/lang/Double;)V
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ class SentryAndroidOptionsWrapper(private val androidOptions: SentryAndroidOptio
73
73
override val sessionReplay: AndroidSentryReplayOptions
74
74
get() = androidOptions.sessionReplay
75
75
76
+ override val sendDefaultPii: Boolean
77
+ get() = androidOptions.isSendDefaultPii
78
+
76
79
override fun applyFromOptions (options : SentryOptions ) {
77
80
options.toAndroidSentryOptionsCallback().invoke(androidOptions)
78
81
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ internal fun CocoaSentryOptions.applyCocoaBaseOptions(kmpOptions: SentryOptions)
23
23
kmpOptions.environment?.let {
24
24
cocoaOptions.environment = it
25
25
}
26
+ cocoaOptions.sendDefaultPii = kmpOptions.sendDefaultPii
26
27
cocoaOptions.releaseName = kmpOptions.release
27
28
cocoaOptions.debug = kmpOptions.debug
28
29
cocoaOptions.sessionTrackingIntervalMillis = kmpOptions.sessionTrackingIntervalMillis.convert()
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ open class SentryAppleOptionsWrapper(private val cocoaOptions: CocoaSentryOption
54
54
override val diagnosticLevel: SentryLevel
55
55
get() = cocoaOptions.diagnosticLevel.toKmpSentryLevel()!!
56
56
57
+ override val sendDefaultPii: Boolean
58
+ get() = cocoaOptions.sendDefaultPii
59
+
57
60
override fun applyFromOptions (options : SentryOptions ) {
58
61
options.toCocoaOptionsConfiguration().invoke(cocoaOptions)
59
62
}
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ internal fun JvmSentryOptions.applyJvmBaseOptions(kmpOptions: SentryOptions) {
23
23
jvmOptions.isAttachStacktrace = kmpOptions.attachStackTrace
24
24
jvmOptions.dist = kmpOptions.dist
25
25
jvmOptions.environment = kmpOptions.environment
26
+ jvmOptions.isSendDefaultPii = kmpOptions.sendDefaultPii
26
27
jvmOptions.release = kmpOptions.release
27
28
jvmOptions.isDebug = kmpOptions.debug
28
29
jvmOptions.sessionTrackingIntervalMillis = kmpOptions.sessionTrackingIntervalMillis
Original file line number Diff line number Diff line change @@ -191,6 +191,19 @@ public open class SentryOptions {
191
191
*/
192
192
public var sessionReplay: SentryReplayOptions = SentryReplayOptions ()
193
193
194
+ /* *
195
+ * If this flag is enabled, certain personally identifiable information (PII) is added by active integrations.
196
+ * Among other things, enabling this will enable automatic IP address collection on events.
197
+ *
198
+ * If you enable this option, be sure to manually remove what you don't want to send using
199
+ * our features for managing sensitive data.
200
+ *
201
+ * For further details, refer to the documentation in the respective native SDKs:
202
+ * - [Cocoa](https://docs.sentry.io/platforms/apple/data-management/data-collected/)
203
+ * - [Android](https://docs.sentry.io/platforms/android/data-management/data-collected/)
204
+ */
205
+ public var sendDefaultPii: Boolean = false
206
+
194
207
/* *
195
208
* Experimental options for new features, these options are going to be promoted to SentryOptions
196
209
* before GA.
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ interface CommonPlatformOptions {
14
14
val maxAttachmentSize: Long
15
15
val sampleRate: Double?
16
16
val tracesSampleRate: Double?
17
+ val sendDefaultPii: Boolean
17
18
18
19
fun applyFromOptions (options : SentryOptions )
19
20
}
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ class SentryOptionsTest : BaseSentryTest() {
133
133
assertTrue(options.sessionReplay.maskAllImages)
134
134
assertEquals(SentryReplayOptions .Quality .MEDIUM , options.sessionReplay.quality)
135
135
assertTrue(options.enableWatchdogTerminationTracking)
136
+ assertFalse(options.sendDefaultPii)
136
137
}
137
138
138
139
@Test
@@ -163,6 +164,7 @@ class SentryOptionsTest : BaseSentryTest() {
163
164
sessionReplay.maskAllText = false
164
165
sessionReplay.maskAllImages = false
165
166
sessionReplay.quality = SentryReplayOptions .Quality .LOW
167
+ sendDefaultPii = true
166
168
}
167
169
168
170
val platformOptions = createPlatformOptions()
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ class SentryJvmOptionsWrapper(private val jvmOptions: JvmSentryOptions) : Platfo
46
46
override val diagnosticLevel: SentryLevel
47
47
get() = jvmOptions.diagnosticLevel.toKmpSentryLevel()!!
48
48
49
+ override val sendDefaultPii: Boolean
50
+ get() = jvmOptions.isSendDefaultPii
51
+
49
52
override fun applyFromOptions (options : SentryOptions ) {
50
53
options.toJvmSentryOptionsCallback().invoke(jvmOptions)
51
54
}
You can’t perform that action at this time.
0 commit comments