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 config issues

See original GitHub issue

Was looking at my sentry config and noticed a couple of issues

  • I’d like to add a whitelistUrls array to my config, but the options of this array are merged on every build. So after 3 builds my urls are all listed three times (in sentry.server.config.js)
  • Whitelist urls in Sentry should allow for regexp, but these arent correctly stringified atm. I tihnk we could check for value instanceof RegExp and then just call value.toString()?
  • Functions arent correctly stringified. Id like to try using sentry’s user feedback feature but then you need to pass a beforeSend fn to your options. Nuxt should already provide a serializeFunction helper in the template context, maybe we could use that or did you use String for functions on purpose?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rchlcommented, Aug 27, 2020

Whitelist urls in Sentry should allow for regexp, but these arent correctly stringified atm. I tihnk we could check for value instanceof RegExp and then just call value.toString()?

👍

  • Functions arent correctly stringified. Id like to try using sentry’s user feedback feature but then you need to pass a beforeSend fn to your options. Nuxt should already provide a serializeFunction helper in the template context, maybe we could use that or did you use String for functions on purpose?

As you probably know, the core team discourages serialization of functions. The options are:

  • override module’s plugin by create a file in app/plugin-name.js
  • just creating a normal plugin that extends functionality (but maybe wouldn’t work in this case)
  • (my favourite but not necessarily core’s team favourite) assign a path to the option like beforeSend: '~/config/sentry-before-send.js' and import that within the module.

(see also internal discussion about that at https://discord.com/channels/473401852243869706/735157506300575775/747511148282118495 )

0reactions
rchlcommented, Dec 17, 2022

The first two points from the initial comment should be working just fine now.

The third point about serializing beforeSend should work too as far as I can tell. Unless the beforeSend needs to rely on something that is imported. Then serializing won’t be enough and we would have to support specifying a file that exports a config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues | Sentry Documentation
The Issues page displays information about errors and performance problems in your application. This page allows you to filter by properties such as...
Read more >
Self-Hosted Sentry - Sentry Developer Documentation
This script will take care of all the things you need to get started, including a base-line configuration, and then will tell you...
Read more >
Sentry - Linear Guide
You can also configure automatic creation of Linear issues based on issue/event alerts and metric alerts in Sentry from Alerts > Create Alert...
Read more >
Integrated error tracking compatibility with Sentry SDK - GitLab
The purpose of this issue is ensure that integrated error tracking works with all major ... Stderr, \"Error: configuring sentry: %v\\n\", err)", "\t\t\tos....
Read more >
Network related issues are not getting logged on sentry platform
Used the wizard automate the initial steps using this command npx @sentry/wizard -i nextjs; Added all configurations from next.config.js to next ...
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