-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add noop implementations for BugsnagPerformance classes
- Loading branch information
1 parent
7373858
commit e84642f
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
packages/platforms/react-native/ios/BugsnagPerformanceSpan.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#import "BugsnagPerformanceSpan.h" | ||
|
||
@implementation BugsnagPerformanceSpan | ||
|
||
- (BOOL)isValid { | ||
return NO; | ||
} | ||
|
||
- (NSString *)name { | ||
return @""; | ||
} | ||
|
||
- (NSDate *_Nullable)startTime { | ||
return nil; | ||
} | ||
|
||
- (NSDate *_Nullable)endTime { | ||
return nil; | ||
} | ||
|
||
- (SpanId)parentId { | ||
return 0; | ||
} | ||
|
||
- (void)setParentId:(SpanId)parentId { | ||
// No-op | ||
} | ||
|
||
- (NSMutableDictionary *)attributes { | ||
return [NSMutableDictionary dictionary]; | ||
} | ||
|
||
- (void)abortIfOpen { | ||
// No-op | ||
} | ||
|
||
- (void)abortUnconditionally { | ||
// No-op | ||
} | ||
|
||
- (void)end { | ||
// No-op | ||
} | ||
|
||
- (void)endWithEndTime:(NSDate *)endTime { | ||
// No-op | ||
} | ||
|
||
- (void)setAttribute:(NSString *)attributeName withValue:(id _Nullable)value { | ||
// No-op | ||
} | ||
|
||
@end |
10 changes: 10 additions & 0 deletions
10
packages/platforms/react-native/ios/BugsnagPerformanceSpanContext.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#import "BugsnagPerformanceSpanContext.h" | ||
|
||
@implementation BugsnagPerformanceSpanContext | ||
|
||
- (instancetype) initWithTraceIdHi:(uint64_t)traceIdHi traceIdLo:(uint64_t)traceIdLo spanId:(SpanId)spanId { | ||
self = [super init]; | ||
return self; | ||
} | ||
|
||
@end |
24 changes: 24 additions & 0 deletions
24
packages/platforms/react-native/ios/BugsnagPerformanceSpanOptions.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#import "BugsnagPerformanceSpanOptions.h" | ||
|
||
@implementation BugsnagPerformanceSpanOptions | ||
|
||
- (instancetype)initWithName:(NSString *)name | ||
startTime:(NSDate *)startTime | ||
attributes:(NSDictionary<NSString *, id> *)attributes { | ||
self = [super init]; | ||
return self; | ||
} | ||
|
||
- (NSString *)name { | ||
return @""; | ||
} | ||
|
||
- (NSDate *)startTime { | ||
return [NSDate date]; | ||
} | ||
|
||
- (NSDictionary<NSString *, id> *)attributes { | ||
return @{}; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters