Introduce new config option for JS-based Sentry
* Also update environment_variables.md
This commit is contained in:
19
config/initializers/sentry_javascript.rb
Normal file
19
config/initializers/sentry_javascript.rb
Normal file
@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class SentryJavascript
|
||||
def self.active?
|
||||
dsn.present? && %w[development test].exclude?(environment)
|
||||
end
|
||||
|
||||
def self.dsn
|
||||
ENV['SENTRY_JAVASCRIPT_DSN']
|
||||
end
|
||||
|
||||
def self.release
|
||||
Sentry.configuration.release
|
||||
end
|
||||
|
||||
def self.environment
|
||||
Sentry.configuration.environment
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user