@Get("/api/v2/traces")
    @Blocking
    public AggregatedHttpResponse getTraces(
        @Param("serviceName") Optional<String> serviceName,
        @Param("remoteServiceName") Optional<String> remoteServiceName,
        @Param("spanName") Optional<String> spanName,
        @Param("annotationQuery") Optional<String> annotationQuery,
        @Param("minDuration") Optional<Long> minDuration,
        @Param("maxDuration") Optional<Long> maxDuration,
        @Param("endTs") Optional<Long> endTs,
        @Param("lookback") Optional<Long> lookback,
        @Default("10") @Param("limit") int limit) throws IOException {
        QueryRequest queryRequest =
            QueryRequest.newBuilder()
                        .serviceName(serviceName.orElse(null))
                        .remoteServiceName(remoteServiceName.orElse(null))
                        .spanName(spanName.orElse(null))
                        .parseAnnotationQuery(annotationQuery.orElse(null))
                        .minDuration(minDuration.orElse(null))
                        .maxDuration(maxDuration.orElse(null))
                        .endTs(endTs.orElse(System.currentTimeMillis()))
                        .lookback(lookback.orElse(defaultLookback))
                        .limit(limit)
                        .build();
        DebuggingTraceContext traceContext = DebuggingTraceContext.TRACE_CONTEXT.get();
        DebuggingSpan debuggingSpan = null;
        try {
            StringBuilder builder = new StringBuilder();
            if (traceContext != null) {
                builder.append("Condition: QueryRequest: ")
                       .append(queryRequest);
                debuggingSpan = traceContext.createSpan("Query /api/v2/traces");
                debuggingSpan.setMsg(builder.toString());
            }
            Duration duration = new Duration();
            duration.setStep(Step.SECOND);
            DateTime endTime = new DateTime(queryRequest.endTs());
            DateTime startTime = endTime.minus(org.joda.time.Duration.millis(queryRequest.lookback()));
            duration.setStart(startTime.toString("yyyy-MM-dd HHmmss"));
            duration.setEnd(endTime.toString("yyyy-MM-dd HHmmss"));
            List<List<Span>> traces = getZipkinQueryDAO().getTracesDebuggable(queryRequest, duration);
            appendEventsToTracesDebuggable(traces);
            return response(encodeTraces(traces));
        } 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