See here, look at the very last definition, def. 2 under the adverb sense of the word. https://ordbok.uib.no/perl/ordbok.cgi? OPP=sann&bokmaal=+&ordbok=bokmaal
"in expression of happiness, surprise".
It's not the most common meaning for 'sann'. More of the time when it appears in sentences it is used as an adjective meaning true, right, or correct. But this expression "hei sann" is a fixed expression that means "hi there" or "hey there".
Holy crap! I have lived in Norway for 2 years and only just realised this was two words rather than one.