private static Attributes getReadDataBlockInternalAttributes(Span span) {
    // 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 = Attributes.builder();
    Optional.of(Context.current()).map(val -> val.get(CONTEXT_KEY))
      .ifPresent(c -> c.accept(attributesBuilder));
    return attributesBuilder.build();
  }
Returns OpenTelemetry Attributes for a Span that is reading a data block with relevant
metadata. Will short-circuit if the span isn't going to be captured/OTEL isn't enabled.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java