private static Attributes getHeapBytesReadAttributes(Span span, int heapBytesRead) {
    // It's expensive to record these attributes, so we avoid the cost of doing this if the span
    // isn't going to be persisted
    if (!span.isRecording()) {
      return Attributes.empty();
    }

    final AttributesBuilder attributesBuilder = builderFromContext(Context.current());
    annotateHeapBytesRead(attributesBuilder, heapBytesRead);

    return attributesBuilder.build();
  }
Builds OpenTelemtry attributes to be recorded on a span for an event which reads just heap
bytes. This will short-circuit and record nothing if OpenTelemetry isn't enabled.
hbase-common/src/main/java/org/apache/hadoop/hbase/io/util/BlockIOUtils.java