@Override
  public void onScanMetricsCreated(ScanMetrics scanMetrics) {
    TraceUtil.trace(() -> delegate.onScanMetricsCreated(scanMetrics),
      "TracedAdvancedScanResultConsumer#onScanMetricsCreated");
  }
A drop-in replacement for {@link BufferingScanResultConsumer} that adds tracing spans to its
implementation of the {@link AdvancedScanResultConsumer} API.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TracedAdvancedScanResultConsumer.java