DavidLiu 4 hónapja
szülő
commit
5e39c509a7

+ 2 - 2
src/core/callcenter/esl/handler/channel_answer_handler.py

@@ -109,7 +109,7 @@ class ChannelAnswerHandler(EslEventHandler):
                          call.caller, call.called, next_command.device_id, next_command.next_value))
         if CallType.BOT_CALL.code == call.call_type:
             call.answer_flag = AnswerFlag.ROBOT_ANSWER.code
-            registry.counter('call_incoming_bot_answer_requests', '呼入机器人接听量', {'bucket_type': f"{call.bucket_type}"})
+            registry.counter('call_bot_answer_requests', '呼入机器人接听量', {'bucket_type': f"{call.bucket_type}"})
 
         self.record(event, device_id=device.device_id)
         device1 = call.device_info_map.get(next_command.device_id)
@@ -129,7 +129,7 @@ class ChannelAnswerHandler(EslEventHandler):
         device_id = EslEventUtil.getDeviceId(event)
         call.answer_flag = AnswerFlag.AGENT_ANSWER.code
         if CallType.BOT_CALL.code == call.call_type:
-            registry.counter('call_incoming_transfer_requests', '呼入机器人转人量', {'bucket_type': f"{call.bucket_type}"})
+            registry.counter('call_transfer_requests', '呼入机器人转人量', {'bucket_type': f"{call.bucket_type}"})
         self.record(event, device_id)
         call.next_commands.append(NextCommand(device_id, NextType.NEXT_TRANSFER_SUCCESS.code, call.device_list[1]))
         self.logger.info("转接电话中 callId:%s, from:%s, to:%s "% (call.call_id, from_device_id, device_id))

+ 2 - 1
src/core/callcenter/registry.py

@@ -11,7 +11,8 @@ from prometheus_flask_exporter import PrometheusMetrics
 metrics = PrometheusMetrics(app)
 
 
-ESL_EVENT_LATENCY = Histogram('esl_event_latency_seconds', 'Esl Event latency in seconds', ['eventName'])
+
+ESL_EVENT_LATENCY = Histogram('esl_event_latency', 'Esl Event latency in seconds', ['eventName'])
 
 
 def counter(name, description, labels=None, initial_value_when_only_static_labels=True, **kwargs):