From: kgersen Date: Tue, 16 Mar 2021 12:23:12 +0000 (+0100) Subject: - revert 'connect' phase duration X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=92febc8257bc798a78d1de01724a00e8bd310a13;p=blackbox_exporter.git - revert 'connect' phase duration Signed-off-by: kgersen --- diff --git a/prober/http.go b/prober/http.go index c1f3433..95832a6 100644 --- a/prober/http.go +++ b/prober/http.go @@ -549,12 +549,13 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr continue } if trace.tls { + // dnsDone must be set if gotConn was set. + durationGaugeVec.WithLabelValues("connect").Add(trace.connectDone.Sub(trace.dnsDone).Seconds()) durationGaugeVec.WithLabelValues("tls").Add(trace.tlsDone.Sub(trace.tlsStart).Seconds()) + } else { + durationGaugeVec.WithLabelValues("connect").Add(trace.gotConn.Sub(trace.dnsDone).Seconds()) } - // actual connection - we could add a new phase between connectDone and gotConn - durationGaugeVec.WithLabelValues("connect").Add(trace.gotConn.Sub(trace.dnsDone).Seconds()) - // Continue here if we never got a response from the server. if trace.responseStart.IsZero() { continue