Skip to content

ResponseManager Tracing implementation #288

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

Closed
hannahhoward opened this issue Nov 30, 2021 · 1 comment
Closed

ResponseManager Tracing implementation #288

hannahhoward opened this issue Nov 30, 2021 · 1 comment
Assignees
Labels
need/triage Needs initial labeling and prioritization

Comments

@hannahhoward
Copy link
Collaborator

What

Replicate similar span tracking on the ResponseManager side

Implementation

For now, when we receive a new incoming request, we'll create a span from root graphsync context (later we want to find a way to hook this span up to any referenced data transfers, if they have their own tracing context, but we're not gonna try that yet).

Our top level span should last the length of the request until the request is finished. The answer to "when is this" is a bit more complicated than it may seem. There are several paths to the true end of the request in ResponseManager (I just realized how not great this is btw -- perhaps a different ticket):

  1. Actual finish of request with final response code sent over network: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/subscriber.go#L46
  2. Request cancelled by requestor while paused: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/server.go#L113
  3. Request cancelled by requestor while not paused: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/queryexecutor/queryexecutor.go#L134
  4. Network error cancels request while paused: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/server.go#L117
  5. Network error cancels the request while unpaused: https://github.com/ipfs/go-graphsync/blob/main/responsemanager/queryexecutor/queryexecutor.go#L134

bonus Important red herring path: finishTask. finishTask is called when the query has finished executing, meaning all selector data has been read from disk and queued for send. BUT all data has not been sent

We should also track as individual spans for startTask, finishTask, and each run of the query executor.

@hannahhoward hannahhoward added the need/triage Needs initial labeling and prioritization label Nov 30, 2021
@hannahhoward hannahhoward moved this from Icebox to In Progress in Project Thunder (Interop) Dec 1, 2021
@rvagg
Copy link
Member

rvagg commented Dec 14, 2021

closed via #291

@rvagg rvagg closed this as completed Dec 14, 2021
Repository owner moved this from In Progress to Done in Project Thunder (Interop) Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants