@Get("/api/v2/trace/{traceId}")
    @Blocking
    public AggregatedHttpResponse getTraceById(@Param("traceId") String traceId) throws IOException {
        DebuggingTraceContext traceContext = DebuggingTraceContext.TRACE_CONTEXT.get();
        DebuggingSpan debuggingSpan = null;
        try {
            StringBuilder builder = new StringBuilder();
            if (traceContext != null) {
                builder.append("Condition: traceId: ")
                       .append(traceId);
                debuggingSpan = traceContext.createSpan("Query /api/v2/trace/{traceId}");
                debuggingSpan.setMsg(builder.toString());
            }
            if (StringUtil.isEmpty(traceId)) {
                return AggregatedHttpResponse.of(BAD_REQUEST, ANY_TEXT_TYPE, "traceId is empty or null");
            }
            List<Span> trace = getZipkinQueryDAO().getTraceDebuggable(Span.normalizeTraceId(traceId.trim()), null);
            if (CollectionUtils.isEmpty(trace)) {
                return AggregatedHttpResponse.of(NOT_FOUND, ANY_TEXT_TYPE, traceId + " not found");
            }
            appendEventsDebuggable(trace, getSpanAttachedEventQueryDAO().queryZKSpanAttachedEventsDebuggable(
                SpanAttachedEventTraceType.ZIPKIN, Arrays.asList(traceId), null));
            return response(SpanBytesEncoder.JSON_V2.encodeList(trace));
        } finally {
            if (traceContext != null && debuggingSpan != null) {
                traceContext.stopSpan(debuggingSpan);
            }
        }
    }
Reference from zipkin2.server.internal.ZipkinQueryApiV2 for the API consistent.
oap-server/server-query-plugin/zipkin-query-plugin/src/main/java/org/apache/skywalking/oap/query/zipkin/handler/ZipkinQueryHandler.java