From ec3c34969ab58b3644b84755f9d163eb7ff3678f Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Thu, 5 Jun 2025 09:31:32 +0800 Subject: [PATCH] =?UTF-8?q?---author:chenrui---date:2025/6/4-----for:[issu?= =?UTF-8?q?es/8309]=E7=B3=BB=E7=BB=9F=E7=9B=91=E6=8E=A7>=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=BF=BD=E8=B8=AA=EF=BC=8C=E5=88=97=E8=A1=A8=E6=AF=8F=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=80=E4=B8=8B=EF=BC=8C=E6=80=BB=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=B0=B1=E5=87=8F=E4=B8=80#8309=20---?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomInMemoryHttpTraceRepository.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/monitor/actuator/httptrace/CustomInMemoryHttpTraceRepository.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/monitor/actuator/httptrace/CustomInMemoryHttpTraceRepository.java index 16fec3040..2b9218d66 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/monitor/actuator/httptrace/CustomInMemoryHttpTraceRepository.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/monitor/actuator/httptrace/CustomInMemoryHttpTraceRepository.java @@ -19,6 +19,21 @@ public class CustomInMemoryHttpTraceRepository extends InMemoryHttpTraceReposito return super.findAll(); } + /** + * for [issues/8309]系统监控>请求追踪,列表每刷新一下,总数据就减一#8309 + * @param trace + * @author chenrui + * @date 2025/6/4 19:38 + */ + @Override + public void add(HttpTrace trace) { + // 只有当请求不是OPTIONS方法,并且URI不包含httptrace时才记录数据 + if (!"OPTIONS".equals(trace.getRequest().getMethod()) && + !trace.getRequest().getUri().toString().contains("httptrace")) { + super.add(trace); + } + } + public List findAll(String query) { List allTrace = super.findAll(); if (null != allTrace && !allTrace.isEmpty()) {