default List<SWSpanAttachedEventRecord> querySWSpanAttachedEventsDebuggable(SpanAttachedEventTraceType type, List<String> traceIds, @Nullable Duration duration) throws IOException {
        DebuggingTraceContext traceContext = DebuggingTraceContext.TRACE_CONTEXT.get();
        DebuggingSpan span = null;
        try {
            StringBuilder builder = new StringBuilder();
            if (traceContext != null) {
                span = traceContext.createSpan("Query Dao: querySWSpanAttachedEvents");
                builder.append("Condition: Span Type: ")
                       .append(type)
                       .append(", TraceIds: ")
                       .append(traceIds);
                span.setMsg(builder.toString());
            }
            return querySWSpanAttachedEvents(traceIds, duration);
        } finally {
            if (traceContext != null && span != null) {
                traceContext.stopSpan(span);
            }
        }
    }
@param duration nullable unless for BanyanDB query from cold stage
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/query/ISpanAttachedEventQueryDAO.java