Skip to content

Commit

Permalink
Merge pull request #119 from Canny-Code/add_sentry
Browse files Browse the repository at this point in the history
[FEAT] Add Sentry
  • Loading branch information
trinitytakei authored Nov 22, 2024
2 parents 60dd613 + eacb3b7 commit 8dd7405
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .erb-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ linters:
DeprecatedClasses:
enabled: true
ErbSafety:
enabled: true
enabled: false
better_html_config: .better-html.yml
ExtraNewline:
enabled: true
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ gem "octokit", "~> 9.2.0"
gem "omniauth-github", github: "omniauth/omniauth-github", branch: "master"
gem "omniauth-rails_csrf_protection"
gem "propshaft", "~> 1.1.0"
gem "sentry-ruby"
gem "sentry-rails"
gem "stackprof"
gem "solid_cache", "~> 1.0.6"
gem "solid_queue", "~> 1.0.2"
gem "sqlite3", "~> 2.3.0"
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sentry-rails (5.21.0)
railties (>= 5.0)
sentry-ruby (~> 5.21.0)
sentry-ruby (5.21.0)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand Down Expand Up @@ -454,6 +460,7 @@ GEM
net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
ostruct
stackprof (0.2.26)
stimulus-rails (1.3.4)
railties (>= 6.0.0)
stringio (3.1.1)
Expand Down Expand Up @@ -538,11 +545,14 @@ DEPENDENCIES
rails (= 8.0.0)
rubocop-rails-omakase
selenium-webdriver (~> 4.26.0)
sentry-rails
sentry-ruby
simplecov
simplecov-tailwindcss
solid_cache (~> 1.0.6)
solid_queue (~> 1.0.2)
sqlite3 (~> 2.3.0)
stackprof
stimulus-rails
thruster (~> 0.1.9)
turbo-rails (~> 2.0.11)
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<link rel="apple-touch-icon" href="/icon.png">
<%= vite_client_tag %>
<%= vite_javascript_tag "application" %>
<%= Sentry.get_trace_propagation_meta.html_safe %>
</head>
<body>
<% if notice %>
Expand Down
19 changes: 19 additions & 0 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

Sentry.init do |config|
config.dsn = "https://9a5d6b46b2aceb55085f3813b9862aff@o4508342968975360.ingest.de.sentry.io/4508342982934608"
config.breadcrumbs_logger = [ :active_support_logger, :http_logger ]

# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for tracing.
# We recommend adjusting this value in production.
config.traces_sample_rate = 1.0
# or
config.traces_sampler = lambda do |context|
true
end
# Set profiles_sample_rate to profile 100%
# of sampled transactions.
# We recommend adjusting this value in production.
config.profiles_sample_rate = 0.5
end

0 comments on commit 8dd7405

Please sign in to comment.