[6.6.0][启自驾] refactor: 启自驾埋点key 修正,增加日志;
This commit is contained in:
@@ -119,9 +119,9 @@ object OchAutoPilotManager : IMoGoReceiveReceivedAckListener, IMoGoFsm2024Listen
|
||||
/**
|
||||
* 启动自驾失败切 FSM返回的Session和启动SessionId 不同
|
||||
*/
|
||||
fun checkStartSeesionAndFailSessionId(){
|
||||
fun checkStartSessionAndFailSessionId(){
|
||||
if(globalSessionId.get() != fsmBackSessionId.get()){
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailCheckSeesiongDiff(globalSessionId.get(),
|
||||
OchAutopilotAnalytics.triggerStartAutopilotFailCheckSessionDiff(globalSessionId.get(),
|
||||
fsmBackSessionId.get())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ object OchAutopilotAnalytics {
|
||||
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_DISTANCE = "event_key_vehicle_start_autopilot_state_distance_15"
|
||||
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION_WAITSTATE = "event_key_vehicle_start_autopilot_state_sessiong_waiting"
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION = "event_key_vehicle_start_autopilot_state_sessiong"
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION_Inner = "event_key_vehicle_start_autopilot_cmd_session"
|
||||
private const val EVENT_KEY_INFO_AUTOPILOT_SESSION_FSMBACK = "event_key_vehicle_start_autopilot_cmd_session"
|
||||
private const val EVENT_KEY_VEHICLE_START_AUTOPILOT_CMD_SESSION_DUPLICATED = "event_key_vehicle_start_autopilot_cmd_session_duplicated"
|
||||
private const val EVENT_KEY_VEHICLE_START_AUTOPILOT_CMD_SESSION_DIFF = "event_key_vehicle_start_autopilot_cmd_session_diff"
|
||||
private const val EVENT_PARAM_VEHICLE_START_AUTOPILOT_CMD_SESSION_ID_START = "cmd_session_id_start"
|
||||
private const val EVENT_PARAM_VEHICLE_START_AUTOPILOT_CMD_SESSION_ID_FSM_RETURN = "cmd_session_id_fsm_return"
|
||||
|
||||
private val LOOP_PERIOD_15S = 15 * 1000L
|
||||
|
||||
@@ -97,18 +97,18 @@ object OchAutopilotAnalytics {
|
||||
fun triggerCanStartAutopilotBySessionId(globalSessionId : Long){
|
||||
val map = hashMapOf<String, Any>()
|
||||
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
OchChainLogManager.writeChainLog("启动自驾Sessiong判断","已有globalSessionId:${globalSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION_WAITSTATE, patch = map)
|
||||
OchChainLogManager.writeChainLog("启动自驾Session判断","已有globalSessionId:${globalSessionId}", eventID = EVENT_KEY_VEHICLE_START_AUTOPILOT_CMD_SESSION_DUPLICATED, patch = map)
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动失败后 对比两个session是否相同
|
||||
*/
|
||||
fun triggerStartAutopilotFailCheckSeesiongDiff(globalSessionId: Long, fsmBackSessionId: Long){
|
||||
fun triggerStartAutopilotFailCheckSessionDiff(globalSessionId: Long, fsmBackSessionId: Long){
|
||||
val map = hashMapOf<String, Any>()
|
||||
map[EVENT_PARAM_AUTOPILOTANALYTICS_GROUP] = EVENT_PARAM_AUTOPILOTANALYTICS_GROUP
|
||||
map[EVENT_KEY_INFO_AUTOPILOT_SESSION_Inner] = globalSessionId
|
||||
map[EVENT_KEY_INFO_AUTOPILOT_SESSION_FSMBACK] = fsmBackSessionId
|
||||
OchChainLogManager.writeChainLog("启动自驾失败且SessionId不同","globalSessionId:${globalSessionId}——————fsmBackSessionId:${fsmBackSessionId}", eventID = EVENT_KEY_INFO_AUTOPILOT_SESSION, patch = map)
|
||||
map[EVENT_PARAM_VEHICLE_START_AUTOPILOT_CMD_SESSION_ID_START] = globalSessionId
|
||||
map[EVENT_PARAM_VEHICLE_START_AUTOPILOT_CMD_SESSION_ID_FSM_RETURN] = fsmBackSessionId
|
||||
OchChainLogManager.writeChainLog("启动自驾失败且SessionId不同","globalSessionId:${globalSessionId}——————fsmBackSessionId:${fsmBackSessionId}", eventID = EVENT_KEY_VEHICLE_START_AUTOPILOT_CMD_SESSION_DIFF, patch = map)
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ object OchAutopilotAnalytics {
|
||||
fun triggerStartAutopilotFailureEventByAdas(failCode: String, failMsg: String, startFailDate: Long) {
|
||||
BizLoopManager.removeCallback(timeOutRunnable)
|
||||
// 判断Session 是否相同
|
||||
OchAutoPilotManager.checkStartSeesionAndFailSessionId()
|
||||
OchAutoPilotManager.checkStartSessionAndFailSessionId()
|
||||
triggerStartAutopilotFailureEvent(failCode, failMsg, startFailDate)
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ object OchAutopilotAnalytics {
|
||||
|
||||
private fun triggerStartAutopilotFailureEvent(failCode: String, failMsg: String, startFailDate: Long) {
|
||||
if(OchAutoPilotManager.canStartAutopilotBySessionIdInner()){
|
||||
CallerLogger.e(SceneConstant.M_OCHCOMMON + "triggerStartAutopilotFailureEvent canStartAutopilotBySessionIdInner == false")
|
||||
return
|
||||
}
|
||||
OchAutoPilotManager.clearGlobalSessionId()
|
||||
@@ -172,11 +173,12 @@ object OchAutopilotAnalytics {
|
||||
mStartAutopilotKey = if (restart) getEventKeyRestartService() else getEventKeyStartService()
|
||||
if (send) {
|
||||
if(OchAutoPilotManager.canStartAutopilotBySessionIdInner()){
|
||||
CallerLogger.e(SceneConstant.M_OCHCOMMON + "triggerStartAutopilotEvent canStartAutopilotBySessionIdInner == false")
|
||||
return
|
||||
}
|
||||
OchAutoPilotManager.clearGlobalSessionId()
|
||||
if (mStartAutopilotParams.isEmpty()) return
|
||||
BizLoopManager.removeCallback(timeOutRunnable)
|
||||
if (mStartAutopilotParams.isEmpty()) return
|
||||
// 开启成功,上报埋点
|
||||
mStartAutopilotParams[EVENT_PARAM_START_FAILURE_CODE] = ""
|
||||
mStartAutopilotParams[EVENT_PARAM_START_FAILURE_MSG] = ""
|
||||
|
||||
Reference in New Issue
Block a user