move building of metric name in to its own function for extensibility

Hi there,

I want to use the middleware, but don't want to use the same naming strategy as you, so I've extracted that bit in to a function so I can override it.

Would be good if you could merge it in, ta!


Cheers,
Nick