Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(p2p): extend server tracing #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore(p2p): extend server tracing #218

wants to merge 1 commit into from

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