Files
codeocean/config/initializers/sentry_javascript.rb
Sebastian Serth 4926b33a5f Introduce new config option for JS-based Sentry
* Also update environment_variables.md
2021-07-08 20:15:29 +02:00

20 lines
327 B
Ruby

# 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