class TracezDataAggregator {

  List<SpanData> getOkSpans(String spanName, long lowerBound, long upperBound) {
    Map<String, TracezSpanBuckets> completedSpanCache = spanProcessor.getCompletedSpanCache();
    TracezSpanBuckets buckets = completedSpanCache.get(spanName);
    if (buckets == null) {
      return Collections.emptyList();
    }
    Collection<ReadableSpan> allOkSpans = buckets.getOkSpans();
    List<SpanData> filteredSpans = new ArrayList<>();
    for (ReadableSpan span : allOkSpans) {
      if (span.getLatencyNanos() >= lowerBound && span.getLatencyNanos() < upperBound) {
        filteredSpans.add(span.toSpanData());
      }
    }
    return Collections.unmodifiableList(filteredSpans);
  }

    TracezDataAggregator(TracezSpanProcessor spanProcessor);

}