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

WIP Correlate sent errors with received errors. #2037

Merged
merged 3 commits into from
Nov 19, 2020

Conversation

erights
Copy link
Member

@erights erights commented Nov 19, 2020

This is a delta to the hackathon branch as a temporary approximation of a future change.

When sending errors over marshal, generate an errorId to uniquely identify this error sending and use assert.note to associate that errorId with both the error as sent and the copy of that error as received. Somehow remember the association of that errorId with the sent error so that the sent error's hidden debug information --- details and stack trace --- can be correlated with the received error, should the received error be reported.

As a temporary stopgap for the hackathon, this PR takes the following shortcuts:

  • Rather than use some internal log or bookkeeping mechanism to associate the errorId with the sent error, just log the sent error to the console, so the association gets printed to the log. This is adequate but painful for human eyeballs for find the association. It is not suitable for a Causeway-like automated tool to stitch together the distributed causality graph.
  • The errorId is not very unique. We're currently only using increasing counts relative to a marshal instance.

This is currently a WIP Draft because it does not yet have new tests for this functionality.

@erights erights force-pushed the remote-errors-hackathon-2020-11 branch from f7129b7 to df9d954 Compare November 19, 2020 00:44
@erights erights force-pushed the remote-errors-hackathon-2020-11 branch from df9d954 to 89016fa Compare November 19, 2020 00:46
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

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

LGTM, glad that tests pass. 💯

@katelynsills
Copy link
Contributor

the changes look good to me, but I would need to see how they affect what the user sees.

Copy link
Contributor

@Chris-Hibbert Chris-Hibbert left a comment

Choose a reason for hiding this comment

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

This seems good. How hard would it be to add a command-line flag to turn this reporting on or off? If it's as verbose as you imply, it would be nice to only get it when someone is tracking a problem down. (Though how many of our developers would know where to turn on the flag?)

@michaelfig
Copy link
Member

This seems good. How hard would it be to add a command-line flag to turn this reporting on or off?

https://github.com/Agoric/agoric-sdk/pull/2037/files#r526533669

@erights
Copy link
Member Author

erights commented Nov 19, 2020

I report progress at Agoric/dapp-fungible-faucet#10 (comment)

Without the -v flag the experience is unchanged. With it, the experience is miserably verbose and unclear. But it does contain the needed clues, so is arguably better than the status quo.

@katelynsills katelynsills marked this pull request as ready for review November 19, 2020 18:45
@katelynsills
Copy link
Contributor

Merging as per discussion in this morning's meeting.

@katelynsills katelynsills merged commit 67b2319 into hackathon-2020-11 Nov 19, 2020
@katelynsills katelynsills deleted the remote-errors-hackathon-2020-11 branch November 19, 2020 18:46
erights added a commit that referenced this pull request Nov 20, 2020
erights added a commit that referenced this pull request Nov 21, 2020
erights added a commit that referenced this pull request Dec 12, 2020
erights added a commit that referenced this pull request Dec 12, 2020
erights added a commit that referenced this pull request Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants