aws / aws/aws-xray-sdk-node

`aws-xray-sdk-postgres` does not work with `pg-copy-streams`

Open
#478 1 comment 0 reactions 1 assignee Claimed by @willarmiros View on GitHub
bug
Dominant language
JavaScript
Stars
280
Forks
157
PR merge metrics
No merged PRs in 30d

Description

I use [pg-copy-streams](https://github.com/brianc/node-pg-copy-streams) to stream CSV to a table, just like in the [STDIN example](https://github.com/brianc/node-pg-copy-streams#pipe-from-a-file-to-table-copyin---copy-from). XRay-instrumented `pg.Client` will crash when used with `pg-copy-streams`:

-----

**type**: TypeError
**message**: cb is not a function

**stack**:
TypeError: cb is not a function
at Query.args.callback (/app/node_modules/aws-xray-sdk-postgres/lib/postgres_p.js:88:9)
at Query.handleReadyForQuery (/app/node_modules/pg/lib/query.js:138:12)
at Client._handleReadyForQuery (/app/node_modules/pg/lib/client.js:290:19)
at Connection.emit (events.js:400:28)
at /app/node_modules/pg/lib/connection.js:114:12
at Parser.parse (/app/node_modules/pg-protocol/src/parser.ts:104:9)
at TLSSocket. (/app/node_modules/pg-protocol/src/index.ts:7:48)
at TLSSocket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)"

-----
aws-xray-sdk-core: v3.3.4
aws-xray-sdk-postgres: v3.3.4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.