refactor hostname decision to individual method

Removes some of the decision-making from the init method, moves
decision to a private method and simplifies the main report method.
refactor metrics emission to its own method

Simplify the `report` method, reduce cyclomatic complexity by 1
The new method also uses implict `begin` statements, since the method
does nothing else.