mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
MESSENGER-4535 matomo e2ee error tracking
This commit is contained in:
@@ -116,7 +116,8 @@ NSString *const kDecryptionFailureTrackerAnalyticsCategory = @"e2e.failure";
|
||||
NSString *context = [NSString stringWithFormat:@"code: %ld, description: %@", event.decryptionError.code, event.decryptionError.localizedDescription];
|
||||
reportedFailures[event.eventId] = [[DecryptionFailure alloc] initWithFailedEventId:failedEventId
|
||||
reason:reason
|
||||
context:context];
|
||||
context:context
|
||||
errorCode:event.decryptionError.code];
|
||||
}
|
||||
|
||||
- (void)dispatch
|
||||
@@ -157,16 +158,18 @@ NSString *const kDecryptionFailureTrackerAnalyticsCategory = @"e2e.failure";
|
||||
NSMutableDictionary<NSNumber*, NSNumber*> *failuresCounts = [NSMutableDictionary dictionary];
|
||||
for (DecryptionFailure *failure in failuresToTrack)
|
||||
{
|
||||
failuresCounts[@(failure.reason)] = @(failuresCounts[@(failure.reason)].unsignedIntegerValue + 1);
|
||||
//[self.delegate trackE2EEError:failure.reason context:failure.context];
|
||||
if ( failure.reason == DecryptionFailureReasonUnspecified) {
|
||||
[BWIAnalytics.sharedTracker trackE2EEError:failure.errorCode context:failure.context];
|
||||
} else {
|
||||
failuresCounts[@(failure.reason)] = @(failuresCounts[@(failure.reason)].unsignedIntegerValue + 1);
|
||||
}
|
||||
}
|
||||
|
||||
MXLogDebug(@"[DecryptionFailureTracker] trackFailures: %@", failuresCounts);
|
||||
|
||||
for (NSNumber *reason in failuresCounts)
|
||||
{
|
||||
// FRANK181
|
||||
//[self.delegate trackE2EEError:reason.integerValue count:failuresCounts[reason].integerValue];
|
||||
[BWIAnalytics.sharedTracker trackE2EEErrors:reason.integerValue count:failuresCounts[reason].integerValue];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user