sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Sentry in node making Sequelize show entire logging

Open maduq1 opened this issue 3 years ago • 5 comments

Environment

SaaS (https://sentry.io/)

Version

7.5.0

Steps to Reproduce

Hi, I am integrating sentry with our GCP functions the following way.

GCPFunction.init({
  dsn: "<myInfo>",
  tracesSampleRate: 1.0,
  environment: process.env.<myEnv>,
  release: `myRelease`
});

exports.myFunction = GCPFunction.wrapHttpFunction(async (request, response) => {
  await getQueueHandler(event, null, function (code, result) {
      respond(result, response)
  })
})

These are nodejs GCP functions. Internally there's a lot of stuff which is probably not important to you, but the most noticeable thing is that we are using Sequelize 6.17.0 as ORM.

When we integrated Sentry, the Sequelize queries started logging everything. We haven't made any kind of changes in that level, so it's not clear why is this happening. I found the following unanswered question in your forums: https://forum.sentry.io/t/nodejs-how-to-disable-call-arguments-logging-of-sequelize-function-calls/13455

This is exactly what's happening to me.

According Sequelize documentation (https://forum.sentry.io/t/nodejs-how-to-disable-call-arguments-logging-of-sequelize-function-calls/13455), by default logging is console.log which is exactly what we have there; but it would seem that now with Sentry is logging all function call parameters.

Expected Result

I expect the GCP function logs to be same as before integrating Sentry:

Captura de pantalla 2022-07-20 a las 17 59 41

Actual Result

Logs are more intensive when sentry is enabled:

Captura de pantalla 2022-07-20 a las 17 52 18

maduq1 avatar Jul 20 '22 16:07 maduq1

Routing to @getsentry/ecosystem for triage. ⏲️

getsentry-release avatar Jul 20 '22 16:07 getsentry-release

Routing to @getsentry/team-web-sdk-backend for triage. ⏲️

getsentry-release avatar Jul 20 '22 16:07 getsentry-release

Reassigning since this does appear to be an SDK issue. This issue mentions serveless GCP Node function, but the forum thread mentioned is just a regular node app. SDK team might have more insights here.

leeandher avatar Jul 20 '22 16:07 leeandher

@maduq1 I'm not totally clear how this would be happening, but can you try disabling the Console integration, by adding integrations: defaults => defaults.filter(integration => integration.name !== "Console") to your init options?

lobsterkatie avatar Jul 20 '22 21:07 lobsterkatie

Hi Katie!

Reassigning since this does appear to be an SDK issue. This issue mentions serveless GCP Node function, but the forum thread mentioned is just a regular node app. SDK team might have more insights here.

First, apologies for mixing concepts. I know in this forum thread the environment is a node system and mine is GCP (running in node), but I found it quite a good coincidence with my issue. Sorry if this brought confusion to your team 😅

@maduq1 I'm not totally clear how this would be happening, but can you try disabling the Console integration, by adding integrations: defaults => defaults.filter(integration => integration.name !== "Console") to your init options?

I have just tried, and it works! Now Sequelize logging is back as it was before. Thank you very much for all your help!

maduq1 avatar Jul 21 '22 08:07 maduq1