Extract building connections metric name into a method

Reduce duplicate code across all HTTP connection factories.