Skip to content

Conversation

Wondertan
Copy link
Member

Before, traces only covered "serving" logic, like reading out headers, but writing/reading from/to peers wasn't covered.

Comment on lines 166 to 173
_, err = serde.Write(stream, &p2p_pb.HeaderResponse{Body: bin, StatusCode: code})
if err != nil {
log.Warnw("server: writing header to stream", "err", err)
stream.Reset() //nolint:errcheck
span.SetStatus(codes.Error, err.Error())
return
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set status Ok in the end?

Copy link
Member

@tzdybal tzdybal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @walldiss pointed out, there is no codes.Ok in case of no errors (and default value is Unknown).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants