Skip to content

pg tracing fails when used with pg-copy-streams #3314

Description

@boennemann

Package + Version

  • @sentry/browser
  • @sentry/node
  • @sentry/tracing
  • raven-js
  • raven-node (raven for node)
  • other:

Version:

6.2.1

Description

When using pg together with pg-copy-streams the tracing code breaks the operation.

orig.call(...).then is not a function

https://github.com/getsentry/sentry-javascript/blob/master/packages/tracing/src/integrations/postgres.ts#L66

import pg from "pg"
import { to } from "pg-copy-streams"

const client = new pg.Client()

const query = `COPY (SELECT xxx FROM yyy to STDOUT (DELIMITER ';', FORMAT CSV, ENCODING 'UTF8')`

const dataStream: Readable = client.query(to(query))
>>> fails

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions