Episodes
Tiago Ameller PRO said almost 2 years ago on Tracking Javascript Errors :
Thanks for this episode. I applied to one of my projects in minutes and now it's in production.
My question is how to disable Sentry while I'm developing my app, you know, when environment is not production.
Thanks.


David Kimura PRO said almost 2 years ago on Tracking Javascript Errors :
  I would probably use the environment option which you can create a metatag on the layout with the Rails.env and fetch this to set it in the Sentry init. https://docs.sentry.io/platforms/javascript/configuration/options/#environment


Tiago Ameller PRO said almost 2 years ago on Tracking Javascript Errors :
Ok, that was my first insight. I wonder if Rails has already an environment var provided by rails/ujs. Something such window.railsEnvironent(). If not, is easy to set it on the main layout.

gee.forr PRO said almost 2 years ago on Tracking Javascript Errors :
- love your content and I'm a long time subscriber, but what's with the youtube style merch ads? That seems like something that should rather appear in free episodes, no?

gee.forr PRO said almost 2 years ago on Tracking Javascript Errors :
  Sentry can be initialized without blank connection details. When this is the case, it simply doesnt send exceptions to the sentry instance. Therefore, when compiling your JS frontend, only include Sentry details when pushing to prod, else leave it blank.

That being said - sentry in dev is useful for the breadcumbs when figuring out what led to a crash. To cut out the noise, you can filter events on environment, so that you only see production. The filter bar for environments is the top middle filter.

David Kimura PRO said almost 2 years ago on Tracking Javascript Errors :
  I started including that only on the free episodes. It won't be on the Pro episodes anymore.

Login to Comment