Skip to content

Commit

Permalink
Fix trace to correctly check to make sure its diffing the same type o…
Browse files Browse the repository at this point in the history
…f message (networkservicemesh#599)

Signed-off-by: Ed Warnicke <hagbard@gmail.com>
Signed-off-by: Sergey Ershov <sergey.ershov@xored.com>
  • Loading branch information
edwarnicke authored and Sergey Ershov committed Dec 20, 2020
1 parent 8308e9b commit 29133d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/networkservice/core/trace/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 29133d1

Please sign in to comment.