private static Set<Operation> unpackRowOperations(final Row row) {
    final Set<Operation> ops = new HashSet<>();
    if (row instanceof CheckAndMutate) {
      final CheckAndMutate cam = (CheckAndMutate) row;
      ops.addAll(unpackRowOperations(cam));
    }
    if (row instanceof RowMutations) {
      final RowMutations mutations = (RowMutations) row;
      final List<Operation> operations = mutations.getMutations().stream()
        .map(TableOperationSpanBuilder::valueFrom).collect(Collectors.toList());
      ops.addAll(operations);
    }
    return ops;
  }
Construct {@link Span} instances originating from "table operations" -- the verbs in our public
API that interact with data in tables.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/trace/TableOperationSpanBuilder.java