@Override
    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
        throws
        ServletException, IOException {
        try {
            MDC.put(LogUtils.TRACE_ID, LogUtils.generateTraceId());
            filterChain.doFilter(request, response);
        } finally {
            MDC.remove(LogUtils.TRACE_ID);
        }
    }
Intercept the log and put in the trace id

@author Jiaju Zhuang
chat2db-server/chat2db-server-web-start/src/main/java/ai/chat2db/server/web/start/log/LogOncePerRequestFilter.java