From 29133d1b1456c7871bbd83d6fe97b1a4ef61a547 Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Fri, 20 Nov 2020 15:06:23 -0600 Subject: [PATCH] Fix trace to correctly check to make sure its diffing the same type of message (#599) Signed-off-by: Ed Warnicke Signed-off-by: Sergey Ershov --- pkg/networkservice/core/trace/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/networkservice/core/trace/common.go b/pkg/networkservice/core/trace/common.go index 4e5d9d827d..9ef26e27f0 100644 --- a/pkg/networkservice/core/trace/common.go +++ b/pkg/networkservice/core/trace/common.go @@ -29,7 +29,7 @@ import ( func logRequest(span spanhelper.SpanHelper, request proto.Message) { connInfo, ok := trace(span.Context()) if ok && !proto.Equal(connInfo.Request, request) { - if connInfo.Request != nil { + if connInfo.Request != nil && connInfo.Request.ProtoReflect().Descriptor().FullName() == request.ProtoReflect().Descriptor().FullName() { requestDiff, hadChanges := Diff(connInfo.Request.ProtoReflect(), request.ProtoReflect()) if hadChanges { span.LogObject("request-diff", requestDiff)