Skip to content

Commit c771423

Browse files
committed
fix: Remove property that had no effect
1 parent 17a26bf commit c771423

21 files changed

+29
-110
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Makes `SentryEventDecodable` internal (#5808)
1818
- The `span` property on `SentryScope` is now readonly (#5866)
1919
- Removes deprecated SentryDebugImageProvider class (#5598)
20+
- Removes the SentryOptions.inAppExclude property because it had no effect (#6646)
2021
- Removes segment property on SentryUser, SentryBaggage, and SentryTraceContext (#5638)
2122
- Removes deprecated TraceContext initializers (#6348)
2223
- Removes deprecated user feedback API, this is replaced with the new feedback API (#5591)

Sources/Sentry/Public/SentryOptions.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ NS_SWIFT_NAME(Options)
449449

450450
/**
451451
* A list of string prefixes of framework names that belong to the app.
452-
* @note This option takes precedence over @c inAppExcludes.
453452
* @note By default, this contains @c CFBundleExecutable to mark it as "in-app".
454453
*/
455454
@property (nonatomic, readonly, copy) NSArray<NSString *> *inAppIncludes;
@@ -460,21 +459,6 @@ NS_SWIFT_NAME(Options)
460459
*/
461460
- (void)addInAppInclude:(NSString *)inAppInclude;
462461

463-
/**
464-
* A list of string prefixes of framework names that do not belong to the app, but rather to
465-
* third-party frameworks.
466-
* @note By default, frameworks considered not part of the app will be hidden from stack
467-
* traces.
468-
* @note This option can be overridden using @c inAppIncludes.
469-
*/
470-
@property (nonatomic, readonly, copy) NSArray<NSString *> *inAppExcludes;
471-
472-
/**
473-
* Adds an item to the list of @c inAppExcludes.
474-
* @param inAppExclude The prefix of the frameworks name.
475-
*/
476-
- (void)addInAppExclude:(NSString *)inAppExclude;
477-
478462
/**
479463
* Set as delegate on the @c NSURLSession used for all network data-transfer tasks performed by
480464
* Sentry.

Sources/Sentry/SentryCrashIntegration.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ - (void)startCrashHandler:(NSString *)cacheDirectory
145145
BOOL canSendReports = NO;
146146
if (installation == nil) {
147147
SentryInAppLogic *inAppLogic =
148-
[[SentryInAppLogic alloc] initWithInAppIncludes:self.options.inAppIncludes
149-
inAppExcludes:self.options.inAppExcludes];
148+
[[SentryInAppLogic alloc] initWithInAppIncludes:self.options.inAppIncludes];
150149

151150
installation = [[SentryCrashInstallationReporter alloc]
152151
initWithInAppLogic:inAppLogic

Sources/Sentry/SentryDefaultThreadInspector.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ - (id)initWithStacktraceBuilder:(SentryStacktraceBuilder *)stacktraceBuilder
6969
- (instancetype)initWithOptions:(SentryOptions *_Nullable)options
7070
{
7171
SentryInAppLogic *inAppLogic =
72-
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes ?: @[]
73-
inAppExcludes:options.inAppExcludes ?: @[]];
72+
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes ?: @[]];
7473
SentryCrashStackEntryMapper *crashStackEntryMapper =
7574
[[SentryCrashStackEntryMapper alloc] initWithInAppLogic:inAppLogic];
7675
SentryStacktraceBuilder *stacktraceBuilder =

Sources/Sentry/SentryMetricKitIntegration.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ - (BOOL)installWithOptions:(SentryOptions *)options
6767
self.measurementFormatter = [[NSMeasurementFormatter alloc] init];
6868
self.measurementFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
6969
self.measurementFormatter.unitOptions = NSMeasurementFormatterUnitOptionsProvidedUnit;
70-
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes
71-
inAppExcludes:options.inAppExcludes];
70+
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes];
7271
self.attachDiagnosticAsAttachment = options.enableMetricKitRawPayload;
7372

7473
return YES;

Sources/Sentry/SentryOptions.m

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ - (instancetype)init
152152
_inAppIncludes = @[ bundleExecutable ];
153153
}
154154

155-
_inAppExcludes = [NSArray new];
156-
157155
// Set default release name
158156
if (infoDict != nil) {
159157
self.releaseName =
@@ -229,11 +227,6 @@ - (void)addInAppInclude:(NSString *)inAppInclude
229227
_inAppIncludes = [self.inAppIncludes arrayByAddingObject:inAppInclude];
230228
}
231229

232-
- (void)addInAppExclude:(NSString *)inAppExclude
233-
{
234-
_inAppExcludes = [self.inAppExcludes arrayByAddingObject:inAppExclude];
235-
}
236-
237230
- (void)setSampleRate:(NSNumber *)sampleRate
238231
{
239232
if (sampleRate == nil) {

Sources/Sentry/SentryOptionsInternal.m

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,6 @@ + (BOOL)validateOptions:(NSDictionary<NSString *, id> *)options
311311
}
312312
}
313313

314-
if ([options[@"inAppExcludes"] isKindOfClass:[NSArray class]]) {
315-
NSArray<NSString *> *inAppExcludes =
316-
[options[@"inAppExcludes"] filteredArrayUsingPredicate:isNSString];
317-
for (NSString *exclude in inAppExcludes) {
318-
[sentryOptions addInAppExclude:exclude];
319-
}
320-
}
321-
322314
if ([options[@"urlSession"] isKindOfClass:[NSURLSession class]]) {
323315
sentryOptions.urlSession = options[@"urlSession"];
324316
}

Sources/Sentry/SentryUIViewControllerSwizzling.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ - (instancetype)initWithOptions:(SentryOptions *)options
5151
{
5252
if (self = [super init]) {
5353
self.options = options;
54-
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes
55-
inAppExcludes:options.inAppExcludes];
54+
self.inAppLogic = [[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes];
5655
self.dispatchQueue = dispatchQueue;
5756
self.objcRuntimeWrapper = objcRuntimeWrapper;
5857
self.subClassFinder = subClassFinder;

Sources/Sentry/SentryUseNSExceptionCallstackWrapper.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ - (SentryCrashStackEntryMapper *)buildCrashStackToEntryMapper
6161
SentryOptions *options = SentrySDKInternal.options;
6262

6363
SentryInAppLogic *inAppLogic =
64-
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes
65-
inAppExcludes:options.inAppExcludes];
64+
[[SentryInAppLogic alloc] initWithInAppIncludes:options.inAppIncludes];
6665
SentryCrashStackEntryMapper *crashStackEntryMapper =
6766
[[SentryCrashStackEntryMapper alloc] initWithInAppLogic:inAppLogic];
6867

Sources/Swift/Core/Helper/SentryInAppLogic.swift

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,30 @@ import ObjectiveC
2828
@objc @_spi(Private) public class SentryInAppLogic: NSObject {
2929

3030
@objc public let inAppIncludes: [String]
31-
private let inAppExcludes: [String]
3231

3332
/**
34-
* Initializes @c SentryInAppLogic with @c inAppIncludes and @c inAppExcludes.
33+
* Initializes @c SentryInAppLogic with @c inAppIncludes.
3534
*
3635
* To work properly for Apple applications the @c inAppIncludes should contain the
3736
* @c CFBundleExecutable, which is the name of the bundle's executable file.
3837
*
39-
* @param inAppIncludes A list of string prefixes of framework names that belong to the app. This
40-
* option takes precedence over @c inAppExcludes.
41-
* @param inAppExcludes A list of string prefixes of framework names that do not belong to the app,
42-
* but rather to third-party packages. Modules considered not part of the app will be hidden from
43-
* stack traces by default.
38+
* @param inAppIncludes A list of string prefixes of framework names that belong to the app.
4439
*/
45-
@objc(initWithInAppIncludes:inAppExcludes:) public init(inAppIncludes: [String], inAppExcludes: [String]) {
40+
@objc(initWithInAppIncludes:) public init(inAppIncludes: [String]) {
4641
self.inAppIncludes = inAppIncludes.map { $0.lowercased() }
47-
self.inAppExcludes = inAppExcludes.map { $0.lowercased() }
4842
super.init()
4943
}
5044

5145
/**
52-
* Determines if the framework belongs to the app by using @c inAppIncludes and @c inAppExcludes.
46+
* Determines if the framework belongs to the app by using @c inAppIncludes.
5347
* Before checking this method lowercases the strings and uses only the @c lastPathComponent of the
5448
* @c imagePath.
5549
*
5650
* @param imagePath the full path of the binary image.
5751
*
5852
* @return @c YES if the framework located at the @c imagePath starts with a prefix of
5953
* @c inAppIncludes. @c NO if the framework located at the @c imagePath doesn't start with a prefix of
60-
* @c inAppIncludes or start with a prefix of @c inAppExcludes.
54+
* @c inAppIncludes.
6155
*/
6256
@objc public func `is`(inApp imagePath: String?) -> Bool {
6357
guard let imagePath else {
@@ -72,12 +66,6 @@ import ObjectiveC
7266
}
7367
}
7468

75-
for inAppExclude in inAppExcludes {
76-
if imageNameLastPathComponent.hasPrefix(inAppExclude) {
77-
return false
78-
}
79-
}
80-
8169
return false
8270
}
8371

@@ -88,8 +76,7 @@ import ObjectiveC
8876
* @param targetClass the class to check.
8977
*
9078
* @return @c YES if the @c targetClass belongs to a framework included in @c inAppIncludes.
91-
* @c NO if targetClass does not belong to a framework in @c inAppIncludes or belongs to a framework in
92-
* @c inAppExcludes.
79+
* @c NO if targetClass does not belong to a framework in @c inAppIncludes.
9380
*/
9481
@objc public func isClassInApp(_ targetClass: AnyClass) -> Bool {
9582
guard let imageName = class_getImageName(targetClass) else {

0 commit comments

Comments
 (0)