GithubHelp home page GithubHelp logo

Comments (4)

imzacm avatar imzacm commented on August 23, 2024 1

I've got this same issue with pg-cursor, I would appreciate either a fix, or if someone can tell me to disable the pg patching (but keep all other functionality).

I forgot to say, I'm using applicationinsights 1.8.5, I've had no problems up to today when I've updated all of my dependencies, when that failed I reinstalled the old deps and got the same issue, so not sure if a dependency somewhere upstream has changed, but the issue seems to stem from here (please correct me if I'm wrong).

Edit:
I've found a temporary solution,
Installing pg under a different name (pg-dup), and using this when I want to use a cursor:

// const { Pool } = require('pg')
const { Pool } = require('pg-dup')
const Cursor = require('pg-cursor')

My package.json dependencies:

"pg": "8.3.0",
"pg-cursor": "2.3.0",
"pg-dup": "npm:[email protected]"

from node-diagnostic-channel.

imzacm avatar imzacm commented on August 23, 2024 1

Thank you, I couldn't see that documented anywhere.
Is there any plan to add support for pg-cursor? Or will I have to permanently disable patching pg?

Either way I'm glad I've got a solution, it'll just be good to know :)

from node-diagnostic-channel.

luciferankon avatar luciferankon commented on August 23, 2024 1

Hi is there any updates to this? We have intermittently turned off the patching but that's causing our pg logs also not showing up in the App insights. Is there a Permanent solution planned? @markwolff I see the PR is also not merged yet.

from node-diagnostic-channel.

markwolff avatar markwolff commented on August 23, 2024

You can disable patching for a module via environment variable

APPLICATION_INSIGHTS_NO_PATCH_MODULES=pg

from node-diagnostic-channel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.