From 92febc8257bc798a78d1de01724a00e8bd310a13 Mon Sep 17 00:00:00 2001 From: kgersen Date: Tue, 16 Mar 2021 13:23:12 +0100 Subject: [PATCH] - revert 'connect' phase duration Signed-off-by: kgersen --- prober/http.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.25.1