+3
-3
did/multi.go
+3
-3
did/multi.go
···
45
45
46
46
func (mr *MultiResolver) GetDocument(ctx context.Context, didstr string) (*did.Document, error) {
47
47
s := time.Now()
48
-
defer func() {
49
-
mrResolveDuration.WithLabelValues(didstr).Observe(time.Since(s).Seconds())
50
-
}()
51
48
52
49
pdid, err := did.ParseDID(didstr)
53
50
if err != nil {
···
55
52
}
56
53
57
54
method := pdid.Protocol()
55
+
defer func() {
56
+
mrResolveDuration.WithLabelValues(method).Observe(time.Since(s).Seconds())
57
+
}()
58
58
59
59
res, ok := mr.handlers[method]
60
60
if !ok {