Resolve hostname once per writer

Instead of for every metric line