Introduce new config option for JS-based Sentry

* Also update environment_variables.md
This commit is contained in:
Sebastian Serth
2021-07-08 20:06:06 +02:00
parent ab7ce316ab
commit 4926b33a5f
3 changed files with 35 additions and 14 deletions

View 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