diff --git a/caddytls/handshake.go b/caddytls/handshake.go index 2d49d9787..077ec6323 100644 --- a/caddytls/handshake.go +++ b/caddytls/handshake.go @@ -121,9 +121,7 @@ func (cfg *Config) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certif // }) cert, err := cfg.getCertDuringHandshake(strings.ToLower(clientHello.ServerName), true, true) if err == nil { - go telemetry.Increment("tls_handshake_count") - } else { - go telemetry.Append("tls_handshake_error", err.Error()) + go telemetry.Increment("tls_handshake_count") // TODO: This is a "best guess" for now, we need something listener-level } return &cert.Certificate, err } diff --git a/telemetry/collection_test.go b/telemetry/collection_test.go index e25b9b061..4199b684a 100644 --- a/telemetry/collection_test.go +++ b/telemetry/collection_test.go @@ -31,7 +31,7 @@ func TestInit(t *testing.T) { t.Errorf("Second call to Init should have panicked") } }() - Init(id) // should panic + Init(id, nil) // should panic } func TestInitEmptyUUID(t *testing.T) { @@ -41,7 +41,7 @@ func TestInitEmptyUUID(t *testing.T) { t.Errorf("Call to Init with empty UUID should have panicked") } }() - Init(uuid.UUID([16]byte{})) + Init(uuid.UUID([16]byte{}), nil) } func TestSet(t *testing.T) { @@ -92,7 +92,7 @@ func doInit(t *testing.T) uuid.UUID { if err != nil { t.Fatalf("Could not make UUID: %v", err) } - Init(id) + Init(id, nil) return id }