File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 11# vNext
22
3+ * Fix: Fix setting in-app-includes from external properties (#1291 )
4+
35
46# 4.2.0
57
Original file line number Diff line number Diff line change @@ -1383,6 +1383,14 @@ void merge(final @NotNull SentryOptions options) {
13831383 for (final Map .Entry <String , String > tag : tags .entrySet ()) {
13841384 this .tags .put (tag .getKey (), tag .getValue ());
13851385 }
1386+ final List <String > inAppIncludes = new ArrayList <>(options .getInAppIncludes ());
1387+ for (final String inAppInclude : inAppIncludes ) {
1388+ addInAppInclude (inAppInclude );
1389+ }
1390+ final List <String > inAppExcludes = new ArrayList <>(options .getInAppExcludes ());
1391+ for (final String inAppExclude : inAppExcludes ) {
1392+ addInAppExclude (inAppExclude );
1393+ }
13861394 }
13871395
13881396 private @ NotNull SdkVersion createSdkVersion () {
Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ class SentryOptionsTest {
177177 externalOptions.setTag(" tag2" , " value2" )
178178 externalOptions.enableUncaughtExceptionHandler = false
179179 externalOptions.tracesSampleRate = 0.5
180+ externalOptions.addInAppInclude(" com.app" )
181+ externalOptions.addInAppExclude(" io.off" )
180182 val options = SentryOptions ()
181183
182184 options.merge(externalOptions)
@@ -192,6 +194,8 @@ class SentryOptionsTest {
192194 assertEquals(mapOf (" tag1" to " value1" , " tag2" to " value2" ), options.tags)
193195 assertFalse(options.enableUncaughtExceptionHandler!! )
194196 assertEquals(0.5 , options.tracesSampleRate)
197+ assertEquals(listOf (" com.app" ), options.inAppIncludes)
198+ assertEquals(listOf (" io.off" ), options.inAppExcludes)
195199 }
196200
197201 @Test
You can’t perform that action at this time.
0 commit comments