File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1111 - [ changelog] ( https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2213 )
1212 - [ diff] ( https://github.com/getsentry/sentry-cli/compare/2.21.2...2.21.3 )
1313
14+ ### Fixes
15+
16+ - Fixed CaptureFailedRequests and FailedRequestStatusCodes not affecting the Cocoa layer ([ #2744 ] ( https://github.com/getsentry/sentry-dotnet/issues/2744 ) )
17+
18+
1419## 3.41.0
1520
1621- Speed up SDK init ([ #2784 ] ( https://github.com/getsentry/sentry-dotnet/pull/2784 ) )
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ private static void InitSentryCocoaSdk(SentryOptions options)
2727 cocoaOptions . DiagnosticLevel = options . DiagnosticLevel . ToCocoaSentryLevel ( ) ;
2828 cocoaOptions . Dsn = options . Dsn ;
2929 cocoaOptions . EnableAutoSessionTracking = options . AutoSessionTracking ;
30+ cocoaOptions . EnableCaptureFailedRequests = options . CaptureFailedRequests ;
31+ cocoaOptions . FailedRequestStatusCodes = GetFailedRequestStatusCodes ( options . FailedRequestStatusCodes ) ;
3032 cocoaOptions . MaxAttachmentSize = ( nuint ) options . MaxAttachmentSize ;
3133 cocoaOptions . MaxBreadcrumbs = ( nuint ) options . MaxBreadcrumbs ;
3234 cocoaOptions . MaxCacheItems = ( nuint ) options . MaxCacheItems ;
@@ -201,4 +203,16 @@ private static string GetDefaultReleaseString()
201203 private static string GetDefaultDistributionString ( ) => GetBundleValue ( "CFBundleVersion" ) ;
202204
203205 private static string GetBundleValue ( string key ) => NSBundle . MainBundle . ObjectForInfoDictionary ( key ) . ToString ( ) ;
206+
207+ private static CocoaSdk . SentryHttpStatusCodeRange [ ] GetFailedRequestStatusCodes ( IList < HttpStatusCodeRange > httpStatusCodeRanges )
208+ {
209+ var nativeRanges = new CocoaSdk . SentryHttpStatusCodeRange [ httpStatusCodeRanges . Count ] ;
210+ for ( var i = 0 ; i < httpStatusCodeRanges . Count ; i ++ )
211+ {
212+ var range = httpStatusCodeRanges [ i ] ;
213+ nativeRanges [ i ] = new CocoaSdk . SentryHttpStatusCodeRange ( range . Start , range . End ) ;
214+ }
215+
216+ return nativeRanges ;
217+ }
204218}
You can’t perform that action at this time.
0 commit comments