From 5df0b42dbb12552ac5e97119833ea61a373ceae4 Mon Sep 17 00:00:00 2001 From: sw1136562366 Date: Mon, 13 May 2024 10:57:39 +0800 Subject: [PATCH] feat: add configkey in extension (#107) --- pkg/plugin/output/gateway/gateway.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/plugin/output/gateway/gateway.go b/pkg/plugin/output/gateway/gateway.go index ffaa295..2263075 100644 --- a/pkg/plugin/output/gateway/gateway.go +++ b/pkg/plugin/output/gateway/gateway.go @@ -151,6 +151,9 @@ func convertToTaskResult2(configKey, targetKey, metricName string, array []*mode a := make([]*pb.WriteMetricsRequestV4_TaskResult, 0, len(taskResultByValueName)+1) for _, r := range taskResultByValueName { + r.Extension = map[string]string{ + "configKey": configKey, + } a = append(a, r) } @@ -166,6 +169,9 @@ func convertToTaskResult2(configKey, targetKey, metricName string, array []*mode Completeness: &pb.WriteMetricsRequestV4_Completeness{ Ok: completeness.OK, }, + Extension: map[string]string{ + "configKey": configKey, + }, } a = append(a, r) }