Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardoventurini committed Nov 8, 2023
1 parent 29e6ca9 commit a352455
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/async/async-hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ export const awaitDetector = new AwaitDetector({

const oldBindEnv = Meteor.bindEnvironment;

/**
* We ignore `bindEnvironment` awaits because they pollute the traces with Meteor internals.
*
* To reproduce, go to the test "Tracer - Build Trace - the correct number of async events are captured for methods"
* and remove the awaitDetector.ignore() call below to see the difference.
*/
Meteor.bindEnvironment = function (...args) {
const func = oldBindEnv.apply(this, args);
return function () {
Expand Down

0 comments on commit a352455

Please sign in to comment.