Used a different size oil filter

So, I finally did my 25 hour oil change today. When I bought the 570 eps from the dealer they sold me an oil filter which is the one I used. When I got the original out, I noticed that it was a different model number from what I purchased. The new one is maybe 1 inch longer. Everything else is the same and it fit in. Is this ok to use?

Stefan