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: ignore TIMERWRAP in AsyncHooksContextManager #1530

Merged
merged 3 commits into from
Sep 21, 2020

Conversation

Flarna
Copy link
Member

@Flarna Flarna commented Sep 14, 2020

Which problem is this PR solving?

Fixes: #1494

Short description of the changes

TIMERWRAP is used internally in node.js up to version 11 to combine timeouts with the same timeout value. This combination can lead to false context propagation.

Every timer additionally creates a Timeout resource therefore TIMERWRAP is not needed for correct propagation and it's safe to ignore it in context manager.

Refs: nodejs/node#20894

TIMERWRAP is used internally in node.js up to version 11 to combine
timeouts with the same timeout value. This combination can lead to
false context propagation.

Every timer additionally creates a Timeout resource therefore TIMERWRAP
is not needed for correct propagation and it's safe to ignore it in
context manager.
@codecov
Copy link

codecov bot commented Sep 14, 2020

Codecov Report

Merging #1530 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1530   +/-   ##
=======================================
  Coverage   93.82%   93.82%           
=======================================
  Files         154      154           
  Lines        4762     4763    +1     
  Branches      951      952    +1     
=======================================
+ Hits         4468     4469    +1     
  Misses        294      294           
Impacted Files Coverage Δ
...ontext-async-hooks/src/AsyncHooksContextManager.ts 100.00% <100.00%> (ø)

@dyladan dyladan added the bug Something isn't working label Sep 15, 2020
@dyladan dyladan merged commit 3bc4d57 into open-telemetry:master Sep 21, 2020
@dyladan dyladan deleted the ignore-timerwrap branch September 21, 2020 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setTimeout callback wrong context on node 10
4 participants