Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(INJI-622): add telemetry event to track face model init fail/sucess #1101

Merged
merged 2 commits into from
Dec 26, 2023

Conversation

vharsh
Copy link
Member

@vharsh vharsh commented Dec 18, 2023

Summary

(Q) What we know so far?
(A) The crash is possible on Android & iOS if the Face SDK is not initialized, there could be other reasons as well hence we are going to log an event in Telemetry and observe if a crash still exists.

(Q) Have we verified that the app crashes?
(A) Yes, I have disabled the download of face model and tried to do a Share with Selfie and a Online QR Login on Android & iOS and in both platforms the phones have crashed.

(Q) Could there be other reasons for the crash?
(A) Yes, I’ve observed one of the issue and tried to fix it and I’ll be adding telemetry events to see if the crash still happens when the face SDK model is initialized correctly.

@vharsh vharsh requested a review from Alka1703 December 18, 2023 09:47
sendErrorEvent(
getErrorEventData(
TelemetryConstants.FlowType.faceModelInit,
TelemetryConstants.EndEventStatus.failure,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an error Id coming from Telemetry constants

sendErrorEvent(
getErrorEventData(
TelemetryConstants.FlowType.faceModelInit,
TelemetryConstants.EndEventStatus.failure,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should the landing screen's name instead of the status. If you want to pass the status send it in additional parameters

@@ -21,11 +29,29 @@ export async function downloadModel() {
var result = await init(resp + '/model.tflite', false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inside a for loop which means we will be logging telemetry events multiple times for the same thing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should log once after retries count is exhausted

…cess

Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
@vharsh vharsh force-pushed the inji-526-iPhone7-crash branch from 9befabc to 7b480ea Compare December 21, 2023 05:53
@vharsh vharsh requested a review from Alka1703 December 21, 2023 05:53
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
@vharsh vharsh force-pushed the inji-526-iPhone7-crash branch from 7b480ea to 254c5d8 Compare December 21, 2023 05:58
Copy link
Contributor

@Alka1703 Alka1703 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -16,6 +23,7 @@ export default async function getAllConfigurations(

export async function downloadModel() {
try {
console.log('restart Face model init');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the log message is restart?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have been removed IMO.

@vharsh vharsh changed the title feat(INJI-526): add telemetry event to track face model init fail/sucess feat(INJI-622): add telemetry event to track face model init fail/sucess Dec 26, 2023
@vharsh vharsh merged commit 1556538 into mosip:develop Dec 26, 2023
3 checks passed
@vharsh vharsh deleted the inji-526-iPhone7-crash branch December 26, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants