@@ -70,7 +70,7 @@ func initMetrics(stats metrics.Scope) *vaMetrics {
7070 Help : "Time taken to validate a challenge" ,
7171 Buckets : metrics .InternetFacingBuckets ,
7272 },
73- []string {"type" , "result" })
73+ []string {"type" , "result" , "problemType" })
7474 stats .MustRegister (validationTime )
7575 remoteValidationTime := prometheus .NewHistogramVec (
7676 prometheus.HistogramOpts {
@@ -162,8 +162,7 @@ type verificationRequestEvent struct {
162162func (va ValidationAuthorityImpl ) getAddr (ctx context.Context , hostname string ) (net.IP , []net.IP , * probs.ProblemDetails ) {
163163 addrs , err := va .dnsClient .LookupHost (ctx , hostname )
164164 if err != nil {
165- va .log .Debug (fmt .Sprintf ("%s DNS failure: %s" , hostname , err ))
166- problem := probs .ConnectionFailure (err .Error ())
165+ problem := probs .DNS (err .Error ())
167166 return net.IP {}, nil , problem
168167 }
169168
@@ -683,7 +682,7 @@ func (va *ValidationAuthorityImpl) validateDNS01(ctx context.Context, identifier
683682 if err != nil {
684683 va .log .Info (fmt .Sprintf ("Failed to lookup TXT records for %s. err=[%#v] errStr=[%s]" , identifier , err , err ))
685684
686- return nil , probs .ConnectionFailure (err .Error ())
685+ return nil , probs .DNS (err .Error ())
687686 }
688687
689688 // If there weren't any TXT records return a distinct error message to allow
@@ -872,7 +871,9 @@ func (va *ValidationAuthorityImpl) PerformValidation(ctx context.Context, domain
872871 prob = probs .ServerInternal ("Records for validation failed sanity check" )
873872 }
874873
874+ var problemType string
875875 if prob != nil {
876+ problemType = string (prob .Type )
876877 challenge .Status = core .StatusInvalid
877878 challenge .Error = prob
878879 logEvent .Error = prob .Error ()
@@ -896,8 +897,9 @@ func (va *ValidationAuthorityImpl) PerformValidation(ctx context.Context, domain
896897 logEvent .Challenge = challenge
897898
898899 va .metrics .validationTime .With (prometheus.Labels {
899- "type" : string (challenge .Type ),
900- "result" : string (challenge .Status ),
900+ "type" : string (challenge .Type ),
901+ "result" : string (challenge .Status ),
902+ "problemType" : problemType ,
901903 }).Observe (time .Since (vStart ).Seconds ())
902904
903905 va .log .AuditObject ("Validation result" , logEvent )
0 commit comments