Replaced . symbol in hostname with - to avoid domain name interference with metric name hierarchy
Socket retry changes
Added a comment