Skip to content

Commit

Permalink
[pg] we need to return the promise (#168)
Browse files Browse the repository at this point in the history
our `query` shim was executing the query properly if instrumentation was active, but it wasn't returning the promise back, leading to

```
TypeError: Cannot read property 'then' of undefined
```

This should fix things.
  • Loading branch information
toshok authored Oct 12, 2019
1 parent c4fef52 commit 03de7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/instrumentation/pg.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let instrumentPg = function(pg, opts = {}) {
return query.apply(this, args);
}

api.startAsyncSpan(
return api.startAsyncSpan(
{
[schema.EVENT_TYPE]: "pg",
[schema.PACKAGE_VERSION]: opts.packageVersion,
Expand Down

0 comments on commit 03de7e3

Please sign in to comment.