How replace/reduce a label string field

Hi, I have a very basic question: output result contains a filed with long names as follows

so I need to tell grafana to have instead of
{{instance}}:{{status_code}}: {{app}}

AFUNCTION{{instance}}, get the length to first dot and replace it with the string according to length.

So if my instance is salam.mysite.com, I need to have only the 5 first caracters which are “salam” instead f the whole string. Thanks for your help

Hi, can somebody help please?