question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sentry in node making Sequelize show entire logging

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lobsterkatiecommented, Jul 20, 2022

@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?

0reactions
maduq1commented, Jul 21, 2022

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node Error Tracking and Performance Monitoring - Sentry
Node application monitoring from Sentry helps developers easily diagnose, fix, and optimize the performance of their code while tracking errors.
Read more >
Sequelize — Show or Log Generated SQL Query Statements
Here's the query setup that logs the generated SQL statement to the console: const User = require('../sequelize-models/user') await User. ...
Read more >
Prevent Sequelize logger from including database credentials
I noticed in Sequelize version 4.4.2 that the log information includes database credentials when creating the model. This is problematic if you ...
Read more >
Best Practices for Node.js Error-handling - Toptal
Developers working with Node.js sometimes find themselves writing not-so-clean code while handling all sorts of errors. This article will introduce you to ...
Read more >
Logger | NestJS - A progressive Node.js framework
js logging package, such as Winston, to implement a completely custom, production grade logging system.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found