Skip to content

Commit 676dbab

Browse files
0RAJAJetDrag
authored andcommitted
feat: 审计中心新建 apipush 异常 --story=132139637
修复 CreateApiPushResource 中 collector_config_name 硬编码为 API_PUSH_COLLECTOR_NAME_CH 导致不同采集项名称重复的问题, 改为使用实际的 collector_config_name 变量保持中英文名称一致 Made-with: Cursor
1 parent 2cee6eb commit 676dbab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/backend/services/web/databus/collector/resources.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
)
9999
from services.web.databus.collector.snapshot.join.http_pull import HttpPullHandler
100100
from services.web.databus.constants import (
101-
API_PUSH_COLLECTOR_NAME_CH,
102101
API_PUSH_COLLECTOR_NAME_FORMAT,
103102
BKBASE_API_MAX_PAGESIZE,
104103
COLLECTOR_NAME_MAX_LENGTH,
@@ -677,7 +676,7 @@ def perform_request(self, validated_request_data):
677676
# 创建自定义上报
678677
custom_params = {
679678
"bk_biz_id": settings.DEFAULT_BK_BIZ_ID,
680-
"collector_config_name": API_PUSH_COLLECTOR_NAME_CH,
679+
"collector_config_name": collector_config_name,
681680
"collector_config_name_en": collector_config_name,
682681
"custom_type": CustomTypeEnum.OTLP_LOG.value,
683682
"category_id": DEFAULT_CATEGORY_ID,
@@ -692,7 +691,7 @@ def perform_request(self, validated_request_data):
692691
bk_data_id=result["bk_data_id"],
693692
collector_plugin_id=plugin_id,
694693
collector_config_id=result["collector_config_id"],
695-
collector_config_name=API_PUSH_COLLECTOR_NAME_CH,
694+
collector_config_name=collector_config_name,
696695
collector_config_name_en=collector_config_name,
697696
custom_type=CustomTypeEnum.OTLP_LOG.value,
698697
description=collector_config_name,

0 commit comments

Comments
 (0)