sentry-javascript
sentry-javascript copied to clipboard
Sentry in node making Sequelize show entire logging
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:

Actual Result
Logs are more intensive when sentry is enabled:

Routing to @getsentry/ecosystem for triage. ⏲️
Routing to @getsentry/team-web-sdk-backend for triage. ⏲️
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.
@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?
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
Consoleintegration, by addingintegrations: defaults => defaults.filter(integration => integration.name !== "Console")to yourinitoptions?
I have just tried, and it works! Now Sequelize logging is back as it was before. Thank you very much for all your help!