NTP-7163 | App OE - Tracking network api request queue time (#14716)
This commit is contained in:
@@ -112,6 +112,7 @@ class NativeAnalyticsConnector internal constructor(context: ReactApplicationCon
|
||||
statusCode = statusCode?.toInt().orZero(),
|
||||
actualLatency = latency.orZero(),
|
||||
networkLatency = latency.orZero(),
|
||||
queueLatency = 0,
|
||||
isNae = isNae,
|
||||
httpStatusCode = statusCode?.toInt().orZero(),
|
||||
vertical = getModuleNameForCheckMate(moduleName),
|
||||
|
||||
@@ -55,6 +55,7 @@ object CheckMateManager {
|
||||
statusCode: Int,
|
||||
actualLatency: Long,
|
||||
networkLatency: Long,
|
||||
queueLatency: Long,
|
||||
isNae: Boolean,
|
||||
httpStatusCode: Int,
|
||||
vertical: String,
|
||||
@@ -74,6 +75,7 @@ object CheckMateManager {
|
||||
"endpoint" to endpoint,
|
||||
"actualLatency" to actualLatency.toString(),
|
||||
"networkLatency" to networkLatency.toString(),
|
||||
"queueLatency" to queueLatency.toString(),
|
||||
"statusCode" to statusCode.toString(),
|
||||
"httpStatusCode" to httpStatusCode.toString(),
|
||||
"vertical" to vertical,
|
||||
@@ -184,10 +186,12 @@ object CheckMateManager {
|
||||
val vertical = metricInfo.vertical
|
||||
val screen = metricInfo.screen
|
||||
val method = apiResponse?.raw()?.request?.method.orEmpty()
|
||||
val queueLatency = maxOf(0, actualLatency - apiLatency)
|
||||
recordNetworkEvent(
|
||||
statusCode = handledResponse.statusCode ?: httpStatusCode,
|
||||
actualLatency = actualLatency,
|
||||
networkLatency = apiLatency,
|
||||
queueLatency = queueLatency,
|
||||
isNae = isNae,
|
||||
httpStatusCode = httpStatusCode,
|
||||
vertical = vertical,
|
||||
|
||||
Reference in New Issue
Block a user