code: private static long spanIdToLong(SpanId spanId) {
      ByteBuffer buffer = ByteBuffer.allocate(SpanId.SIZE);
      buffer.put(spanId.getBytes());
      return buffer.getLong(0);
    }
docs: Using big-endian encoding.