Skip to content

Commit 5bc5830

Browse files
committed
feat(network-details): [swizzle] Gate swizzling based on SDKOptions#networkDetailAllowUrls
1 parent 7569bc8 commit 5bc5830

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/Swift/Integrations/Performance/Network/SentryNetworkTrackingIntegration.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ final class SentryNetworkTrackingIntegration<Dependencies: NetworkTrackerProvide
4141
super.init()
4242

4343
SentrySwizzleWrapperHelper.swizzleURLSessionTask(networkTracker)
44+
45+
#if os(iOS) || os(tvOS)
46+
if !options.sessionReplay.networkDetailAllowUrls.isEmpty {
47+
SentrySwizzleWrapperHelper.swizzleURLSessionDataTasks(forResponseCapture: networkTracker)
48+
}
49+
#endif
4450
}
51+
4552

4653
func uninstall() {
4754
networkTracker.disable()

0 commit comments

Comments
 (0)