Enhance our traces with useful information for tracking retries and disk cache improvements.
What problem is this solving?
We're investigating some problems within the pages-graphql Nodejs app, and have some hypotheses related to retries and disk cache delays/cpu usage causing the problems. This PR adds more information to our traces so that we can better investigate as well as better track improvements via Honeycomb.
How should this be manually tested?
Yarn linking @vtex/api on a locally vtex linked pages-graphql app. Example workspace here.
Dash showing how to track count/times for disk cache steps for different clients.
Retry count and error codeTrace with retry. For this trace I had to locally lower the timeout for vbase calls to 50ms, to reproduce timeouts and see them in the trace.
Screenshot:
Types of changes
[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Requires change to documentation, which has been updated accordingly.
What is the purpose of this pull request?
Enhance our traces with useful information for tracking retries and disk cache improvements.
What problem is this solving?
We're investigating some problems within the pages-graphql Nodejs app, and have some hypotheses related to retries and disk cache delays/cpu usage causing the problems. This PR adds more information to our traces so that we can better investigate as well as better track improvements via Honeycomb.
How should this be manually tested?
Yarn linking @vtex/api on a locally vtex linked pages-graphql app. Example workspace here.
Screenshots or example usage
New disk cache spans Mostly MISS
Mostly HIT/STALE
Screenshot:
Dash showing how to track count/times for disk cache steps for different clients.
Retry count and error code Trace with retry. For this trace I had to locally lower the timeout for vbase calls to 50ms, to reproduce timeouts and see them in the trace.
Screenshot:
Types of changes