-
Notifications
You must be signed in to change notification settings - Fork 712
feat(gax): o11y tracer helper updates #9269
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
Open
+874
−19
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cdf7bc1
refactor(gax): support promises and streams in traceAttempt and preve…
shivanee-p 11597dc
removes use of any
shivanee-p dc24a7f
update formatting
shivanee-p 638d400
refactor(gax): clean up stream listeners and update traceAttempt sign…
shivanee-p 12df94f
fix(gax): fix span ending in stream cleanup and update traceAttempt s…
shivanee-p 6af7f23
refactor(gax): simplify type parameter on traceAttempt
shivanee-p aaa6d54
refactor(gax): remove apitypes and call imports from TracerHelper
shivanee-p b39b884
test(gax): update TracerHelper unit tests and JSDocs
shivanee-p b7a5da0
fix(gax): end span synchronously when result is not a promise or stream
shivanee-p 4139ffb
refactor(gax): use GaxCallResult for traceAttempt implementation and …
shivanee-p 10a3581
feat(gax): add GaxCallResult overload for traceAttempt
shivanee-p 474c57c
fix(gax): support custom thenables and prevent duplicate endSpan in h…
shivanee-p 3be25fe
feat(gax): export traceAttempt from index
shivanee-p 8b2e8a9
test(gax): add unit tests for stream retries and listener cleanup in …
shivanee-p File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
I don't know too much about how this code fits in with the broader architecture, but one thought I had is if we remove the listeners here which I see intends to remove the listeners applied on the stream.on('error', onError) lines of code then it is going to remove other listeners as well that we need?
I remember google-gax applies a lot of error listeners in its middleware to handle retries and other such tasks.
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.
I double checked, and I confirmed taht
removeListener()removes only the reference for that specific callback that's used. In contrast,removeAllListeners()cleans up all of the listeners and would affect the middleware listeners.