@Override
  public void onScanMetricsCreated(ScanMetrics scanMetrics) {
    TraceUtil.trace(() -> delegate.onScanMetricsCreated(scanMetrics),
      "TracedScanResultConsumer#onScanMetricsCreated");
  }
A wrapper over {@link SimpleScanResultConsumer} that adds tracing of spans to its implementation.
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TracedScanResultConsumer.java