private void waitForAndLog(Matcher<SpanData> spanMatcher) {
    final Configuration conf = connectionRule.getAsyncConnection().getConfiguration();
    Waiter.waitFor(conf, TimeUnit.SECONDS.toMillis(5),
      new MatcherPredicate<>(otelClassRule::getSpans, hasItem(spanMatcher)));
    final List<SpanData> spans = otelClassRule.getSpans();
    if (logger.isDebugEnabled()) {
      StringTraceRenderer renderer = new StringTraceRenderer(spans);
      renderer.render(logger::debug);
    }
  }
Test cases to verify tracing coprocessor Endpoint execution
hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorEndpointTracing.java