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(Telemetry): Handle error locations not enclosed in parens #9419

Merged
merged 2 commits into from
May 3, 2021

Conversation

pgrzesik
Copy link
Contributor

@pgrzesik pgrzesik commented May 3, 2021

I've noticed that the previous version didn't correcly handle situations where the location in stack trace was not enclosed in parentheses, e.g. as reported here:

Error ---------------------------------------------------
 
  Error: spawn E2BIG
      at ChildProcess.spawn (node:internal/child_process:403:11)
      at Object.spawn (node:child_process:573:9)
      at /Users/chris/Projects/Nebula/api/node_modules/bestzip/lib/bestzip.js:75:29
      at /Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:1802:20
      at /Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:248:13
      at wrapper (/Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:268:20)
      at iterateeCallback (/Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:421:28)
      at /Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:321:20
      at /Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:245:17
      at /Users/chris/Projects/Nebula/api/node_modules/async/dist/async.js:1792:24
      at /Users/chris/Projects/Nebula/api/node_modules/bestzip/lib/bestzip.js:49:7
      at processTicksAndRejections (node:internal/process/task_queues:75:11)

This should fix it and additionally it ensures to split on OS-agnostic new line characters.

@codecov
Copy link

codecov bot commented May 3, 2021

Codecov Report

Merging #9419 (af0be21) into master (80511a4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9419   +/-   ##
=======================================
  Coverage   86.90%   86.90%           
=======================================
  Files         321      321           
  Lines       11963    11966    +3     
=======================================
+ Hits        10396    10399    +3     
  Misses       1567     1567           
Impacted Files Coverage Δ
lib/utils/telemetry/resolve-error-location.js 100.00% <100.00%> (ø)
lib/utils/telemetry/anonymize-stacktrace-paths.js 100.00% <0.00%> (ø)

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 80511a4...af0be21. Read the comment docs.

@pgrzesik pgrzesik self-assigned this May 3, 2021
@pgrzesik pgrzesik merged commit bdbf154 into master May 3, 2021
@pgrzesik pgrzesik deleted the properly-handle-stacktraces-without-function-names branch May 3, 2021 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant