nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
500 stars 113 forks source link

normalizeDepth doesn't have any effect #697

Open simon-ccoms opened 1 day ago

simon-ccoms commented 1 day ago

Version

@nuxtjs/sentry: 8.7.0 nuxt: 2.17.0

Sentry configuration

sentry: {
    dsn: process.env.SENTRY_DSN,
    clientIntegrations: {
      ExtraErrorData: {},
      ReportingObserver: { types: ['crash'] },
      HttpClient: true
    },
    config: {
      // Capture headers and cookies
      sendDefaultPii: true,

      normalizeDepth: 5,
    },
  },

Steps to reproduce

Use the above config on a route which returns a response with more than 3 levels of data in it.

What is Expected?

At least 5 levels of the data should appear on the Sentry issue.

What is actually happening?

The default value of 3 is always used, no matter what value is put into the sentry config.

rchl commented 1 day ago

It works here with a manually triggered exception like this:

      this.$sentry.withScope((scope) => {
        scope.setExtra('x', {
          1: {
            2: {
              3: {
                4: {
                  5: {
                    6: {
                      7: {
                        8: {
                          9: {},
                        },
                      },
                    },
                  },
                },
              },
            },
          },
        })
        scope.captureException(new Error('Some error'))
      })

You might need to specify your problem in more details. Ideally provide actual project that reproduces your issue.