1
0

pg.js 450 B

1234567891011121314
  1. 'use strict';
  2. module.exports = function(Raven, pg, originals) {
  3. // Using fill helper here is hard because of `this` binding
  4. var origQuery = pg.Connection.prototype.query;
  5. pg.Connection.prototype.query = function(text) {
  6. Raven.captureBreadcrumb({
  7. category: 'postgres',
  8. message: text
  9. });
  10. origQuery.call(this, text);
  11. };
  12. // todo thread this through
  13. // originals.push([pg.Connection.prototype, 'query', origQuery]);
  14. };