From 860a9275b7efb997336155cb6668c649e5533d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=83=AD=E5=BF=83=E7=BD=91=E5=8F=8B=E9=99=88=E5=BE=B7?= =?UTF-8?q?=E5=8D=8E?= <47016498+rxwycdh@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:56:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A2=84=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=87=8D=E6=96=B0=E5=90=AF=E5=8A=A8=E6=97=B6=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=A9=BA=E6=8C=87=E9=92=88=20--bug=3D131931293=20(#57?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/apm/pre_calculate/window/distributive.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/bk-monitor-worker/internal/apm/pre_calculate/window/distributive.go b/pkg/bk-monitor-worker/internal/apm/pre_calculate/window/distributive.go index af6d73fd1..3bb631113 100644 --- a/pkg/bk-monitor-worker/internal/apm/pre_calculate/window/distributive.go +++ b/pkg/bk-monitor-worker/internal/apm/pre_calculate/window/distributive.go @@ -189,6 +189,9 @@ func (w *DistributiveWindow) getSubWindowMetrics(subId int) (int, int) { traceCount := 0 spanCount := 0 + if subWindow == nil { + return traceCount, spanCount + } subWindow.m.Range(func(key, value any) bool { traceCount++ v := value.(CollectTrace)