File tree Expand file tree Collapse file tree
Sources/Swift/Integrations/SessionReplay/RRWeb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,28 @@ final class SentryRRWebOptionsEvent: SentryRRWebCustomEvent {
2626 payload [ " unmaskedViewClasses " ] = options. unmaskedViewClasses. map ( String . init ( describing: ) ) . joined ( separator: " , " )
2727 }
2828
29+ payload [ " networkDetailHasUrls " ] = options. networkDetailHasUrls
30+
31+ if options. networkDetailHasUrls {
32+ payload [ " networkDetailAllowUrls " ] = options. networkDetailAllowUrls. map { pattern in
33+ if let regex = pattern as? NSRegularExpression {
34+ return regex. pattern
35+ } else {
36+ return String ( describing: pattern)
37+ }
38+ }
39+ payload [ " networkDetailDenyUrls " ] = options. networkDetailDenyUrls. map { pattern in
40+ if let regex = pattern as? NSRegularExpression {
41+ return regex. pattern
42+ } else {
43+ return String ( describing: pattern)
44+ }
45+ }
46+ payload [ " networkCaptureBodies " ] = options. networkCaptureBodies
47+ payload [ " networkRequestHeaders " ] = options. networkRequestHeaders
48+ payload [ " networkResponseHeaders " ] = options. networkResponseHeaders
49+ }
50+
2951 super. init ( timestamp: timestamp, tag: " options " , payload: payload)
3052 }
3153}
You can’t perform that action at this time.
0 commit comments