-
Notifications
You must be signed in to change notification settings - Fork 38
Response message tracing #327
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
Conversation
impossible to know if one or two messages will be sent
} | ||
} | ||
|
||
func (qe *QueryExecutor) nextBlock(taskData ResponseTask) (ipld.Link, []byte, error) { | ||
func (qe *QueryExecutor) nextBlock(ctx context.Context, taskData ResponseTask) (ipld.Link, []byte, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be renamed now to loadBlock
, or call it loadCurrentBlock
and don't return the link since it's now being pulled up to in the caller for span metadata so it's a pointless variable overwrite.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message-build
naming convention thing is the thing that concerns me most, otherwise my other comments are just suggestions or requests for clarification.
The length of these traces is getting large, it'll be interesting to see them in diagnostic tooling! And yeah, graphsync_test.go is getting a bit out of hand with keeping up with the tracing. I really like how explicit it is, but it's probably getting a bit burdensome to keep updated, so maybe for now we should just remove the traces from a few of the tests where they're either super-simple cases or don't test anything novel about the traces.
Goals
Trace the path of each out going response
Implementation
There are three layers of traces here:
message
encompasses the entire lifecycle of the message whilesendMessage
only covers the process of sending it over the wire)