Brianip/metrics fix

Filter out NaN values from JSON by setting ?allowNaN=false
@syamp
probably rename "f" to something more descriptive - filterNaN or allowNaN ? then the comment might not be needed