Module: Kubelink::Sentrylink::Helpers

Defined in:
lib/kubelink/sentry.rb

Instance Method Summary collapse

Instance Method Details

#sentry_include_tagObject



41
42
43
44
45
46
47
48
49
50
# File 'lib/kubelink/sentry.rb', line 41

def sentry_include_tag
  return unless Sentrylink.sentry_dsn.present?

  script = 'https://browser.sentry-cdn.com/5.11.0/bundle.min.js'

  [javascript_include_tag(script, crossorigin: :anonymous),
   javascript_tag(nonce: true) do
     %{Sentry.init({ dsn: "#{Sentrylink.sentry_dsn}" });}.html_safe
   end].join("\n").html_safe
end