Episodes
Tiago Ameller PRO said over 1 year 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 over 1 year ago on Tracking Javascript Errors :
  Tiago Ameller 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

TEST
Basic Options for JavaScript

Learn more about how to configure the SDK. These options are set when the SDK is first initialized, passed to the `init()` as an object.

https://docs.sentry.io/platforms/javascript/configuration/options/


Tiago Ameller PRO said over 1 year 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 over 1 year ago on Tracking Javascript Errors :
David Kimura - 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 over 1 year ago on Tracking Javascript Errors :
  Tiago Ameller 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 over 1 year ago on Tracking Javascript Errors :
  gee.forr  I started including that only on the free episodes. It won't be on the Pro episodes anymore.

Login to Comment