This repository was archived by the owner on Sep 26, 2023. It is now read-only.
RFC: rough sketch of retry tracing (DON'T MERGE) #583
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rough sketch of how I plan on integrating opencensus.
There are 2 main changes being demonstrated in this PR:
Tracerthat gets passed around in theApiCallContext. TheTracercontains methods that correspond to various spans and annotations that will be generated. There are 2 implementations ofTracer: a noop one that will be used for external direct instantiations of theRetryingExecutors in google-cloud-java and the realOpencensusTracer, which will generate real spans and annotations. Each instance of aTracercorresponds to a single logical operation (an operation can contain multiple rpcs for retries).RetryingExecutorandRetryAlgorithmto create them per operation rather then per client. This approach was suggested by @garrettjonesgoogle and is different then the approach I discussed with @vam-google. It avoids the need to break the public surface.@garrettjonesgoogle & @vam-google take a look at this when you have a moment and let me know if I should continue down this road.