From 2a96fee15c80d50d3bf1ea5632a657a5c3c32f12 Mon Sep 17 00:00:00 2001 From: linzhecheng Date: Fri, 26 Jan 2024 12:07:10 +0800 Subject: [PATCH] refactor(sysadvisor): add metric tag Signed-off-by: linzhecheng --- .../plugin/qosaware/resource/cpu/region/region_base.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/agent/sysadvisor/plugin/qosaware/resource/cpu/region/region_base.go b/pkg/agent/sysadvisor/plugin/qosaware/resource/cpu/region/region_base.go index e3b17432b2..d0956ebe20 100644 --- a/pkg/agent/sysadvisor/plugin/qosaware/resource/cpu/region/region_base.go +++ b/pkg/agent/sysadvisor/plugin/qosaware/resource/cpu/region/region_base.go @@ -49,6 +49,7 @@ const ( metricTagKeyPolicyName = "policy_name" metricTagKeyRegionType = "region_type" metricTagKeyRegionName = "region_name" + metricTagKeyRegionNUMAs = "region_numas" metricTagKeyControlKnobName = "control_knob_name" metricTagKeyControlKnobAction = "control_knob_action" ) @@ -389,7 +390,8 @@ func (r *QoSRegionBase) GetHeadroom() (float64, error) { } _ = r.emitter.StoreFloat64(metricRegionHeadroom, headroom, metrics.MetricTypeNameRaw, metrics.ConvertMapToTags(map[string]string{metricTagKeyRegionType: string(r.regionType), - metricTagKeyRegionName: r.name, metricTagKeyPolicyName: string(internal.name)})...) + metricTagKeyRegionName: r.name, metricTagKeyPolicyName: string(internal.name), + metricTagKeyRegionNUMAs: r.bindingNumas.String()})...) r.headroomPolicyNameInUse = internal.name return headroom, nil }