It could make sense to extract it. Do (or will) we have any other http client requests generated from Prometheus?

Without disabling keepalive, we can't set a deadline on the connection -- since a subsequent request would have the same deadline. That's what the second request in the test is covering (with `time.Sleep(15*time.Millisecond)` and after) -- if you comment out the keepalive declaring you should see the test fail.