@SneakyThrows
    @Get("/debugging/query/zipkin/api/v2/trace")
    public String getZipkinTraceById(@Param("traceId") String traceId) {
        DebuggingTraceContext traceContext = new DebuggingTraceContext("traceId: " + traceId, true, false);
        DebuggingTraceContext.TRACE_CONTEXT.set(traceContext);
        try {
            AggregatedHttpResponse response = zipkinQueryHandler.getTraceById(traceId);
            List<Span> trace = new ArrayList<>();
            if (response.status().code() == 200) {
                trace = new Gson().fromJson(
                    response.contentUtf8(), new TypeToken<ArrayList<Span>>() {
                    }.getType()
                );
            }
            DebuggingZipkinQueryTraceRsp result = new DebuggingZipkinQueryTraceRsp(
                trace, transformTrace(
                traceContext.getExecTrace())
            );
            return transToYAMLStringZipkin(result);
        } finally {
            traceContext.stopTrace();
            DebuggingTraceContext.TRACE_CONTEXT.remove();
        }
    }
Only for BanyanDB, can be used to query the trace in the cold stage.
oap-server/server-query-plugin/status-query-plugin/src/main/java/org/apache/skywalking/oap/query/debug/DebuggingHTTPHandler.java