Closed yetithefoot closed 8 years ago
As I understand trace wraps q and mongo somehow. Where should I require @risingstack/trace? How it works?
@risingstack/trace
Before:
require('@risingstack/trace'); // before Q and mongojs var fs = require('fs'); var Q = require('q'); var mongojs = require('mongojs');
or after:
var fs = require('fs'); var Q = require('q'); var mongojs = require('mongojs'); // after Q and mongojs require('@risingstack/trace');
Hey, you should require it as the very first line of you application. Under the hood Trace patches the module system, so when you are require mongojs, this is when it will be instrumented.
mongojs
As I understand trace wraps q and mongo somehow. Where should I require
@risingstack/trace
? How it works?Before:
or after: