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

fix: get stacktrace before any async method call #756

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Dec 16, 2019

The current stacktrace that is included in a SessionLeakError only contains the _acquire method itself, as the _acquire method calls an async method before getting the stacktrace. This change moves the call to get the caller stacktrace to the beginning of the method, which ensures that the stacktrace does contain the information that is needed.

This will also give us additional information that would be valuable to debug #716

Fixes #755

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 16, 2019
@codecov
Copy link

codecov bot commented Dec 16, 2019

Codecov Report

Merging #756 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #756      +/-   ##
==========================================
+ Coverage   96.11%   96.11%   +<.01%     
==========================================
  Files          18       18              
  Lines       15620    15622       +2     
  Branches      532      532              
==========================================
+ Hits        15013    15015       +2     
  Misses        602      602              
  Partials        5        5
Impacted Files Coverage Δ
src/session-pool.ts 99.2% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b891a81...3f0a5cb. Read the comment docs.

@callmehiphop callmehiphop merged commit 3091a78 into googleapis:master Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SessionLeakError does not contain a useful stack
3 participants