From 25824488dd9faa7f096349da44651143431bfb11 Mon Sep 17 00:00:00 2001 From: Artem Kholodnyi Date: Wed, 2 Oct 2024 19:16:13 -0700 Subject: [PATCH] Add optional logging of stacktrace in case of a FAILed image load Reviewed By: erikandre, kartavya-ramnani Differential Revision: D63725366 fbshipit-source-id: f5c3a605dd2e62fe932b06b853cc761740ad1aad --- .../main/java/com/facebook/fresco/ui/common/ImagePerfData.kt | 1 + .../java/com/facebook/fresco/ui/common/ImagePerfLoggingState.kt | 2 ++ .../main/java/com/facebook/fresco/ui/common/ImagePerfState.kt | 1 + 3 files changed, 4 insertions(+) diff --git a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.kt b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.kt index cc0bb8517f..f662e0ab30 100644 --- a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.kt +++ b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfData.kt @@ -46,6 +46,7 @@ class ImagePerfData( val intermediateImageSetTimes: List>, val newIntermediateImageSetPointAvailable: Boolean, val errorMessageOnFailure: String?, + val errorStacktraceStringOnFailure: String?, val errorCodeOnFailure: Int?, val densityDpiOnSuccess: Int?, ) { diff --git a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfLoggingState.kt b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfLoggingState.kt index e55405cdff..97a8a207e5 100644 --- a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfLoggingState.kt +++ b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfLoggingState.kt @@ -29,6 +29,7 @@ open class ImagePerfLoggingState(val infra: ImageRenderingInfra) { var startupStatusOnVisible: String? = null var errorMessageOnFailure: String? = null + var errorStacktraceStringOnFailure: String? = null var errorCodeOnFailure: Int? = null var densityDpiOnSuccess: Int? = null @@ -51,6 +52,7 @@ open class ImagePerfLoggingState(val infra: ImageRenderingInfra) { startupStatusOnVisible = null errorMessageOnFailure = null + errorStacktraceStringOnFailure = null errorCodeOnFailure = null densityDpiOnSuccess = null diff --git a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.kt b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.kt index e6a0886641..138a3a7e26 100644 --- a/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.kt +++ b/ui-common/src/main/java/com/facebook/fresco/ui/common/ImagePerfState.kt @@ -182,6 +182,7 @@ class ImagePerfState(infra: ImageRenderingInfra) : ImagePerfLoggingState(infra) intermediateImageSetTimes.toList(), newIntermediateImageSetPointAvailable, errorMessageOnFailure, + errorStacktraceStringOnFailure, errorCodeOnFailure, densityDpiOnSuccess, )