message: Automatically instrument modules
diff: @@ -52,6 +52,8 @@ export class Notifier extends BaseNotifier {
  process.exit(1);
  });
  });
  +
  + this._instrument();
  }
  scope(): Scope {
  @@ -100,4 +102,15 @@ export class Notifier extends BaseNotifier {
  }, interval);
  });
  }
  +
  + _instrument() {
  + const mods = ['pg', 'mysql', 'mysql2', 'redis', 'http', 'https'];
  + for (let modName of mods) {
  + try {
  + const mod = require(modName);
  + const airbrakeMod = require(`@airbrake/node/dist/instrumentation/${modName}`);
  + airbrakeMod.patch(mod, this);
  + } catch (_) {}
  + }
  + }
  }
  