mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Setup Sentry for error logging (#57)
This commit is contained in:
@@ -34,4 +34,7 @@ SMTP_ADDRESS=replace_with_your_smtp_address
|
||||
SMTP_PORT=replace_with_your_smtp_port
|
||||
|
||||
# some emails are sent via loops.so– again, not needed for local development
|
||||
LOOPS_API_KEY=your_loops_api_key_here
|
||||
LOOPS_API_KEY=your_loops_api_key_here
|
||||
|
||||
# Sentry DSN for error tracking
|
||||
SENTRY_DSN=your_sentry_dsn_here
|
||||
7
Gemfile
7
Gemfile
@@ -33,6 +33,11 @@ gem "tzinfo-data", platforms: %i[ windows jruby ]
|
||||
gem "solid_cache"
|
||||
gem "solid_cable"
|
||||
|
||||
# Profiling & error tracking
|
||||
gem "stackprof"
|
||||
gem "sentry-ruby"
|
||||
gem "sentry-rails"
|
||||
|
||||
gem "good_job"
|
||||
|
||||
# Slack client
|
||||
@@ -85,8 +90,6 @@ group :development do
|
||||
gem "rack-mini-profiler"
|
||||
# For memory profiling via RMP
|
||||
gem "memory_profiler"
|
||||
# For call-stack profiling flamegraphs via RMP
|
||||
gem "stackprof"
|
||||
end
|
||||
|
||||
group :test do
|
||||
|
||||
@@ -391,6 +391,12 @@ GEM
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
rubyzip (>= 1.2.2, < 3.0)
|
||||
websocket (~> 1.0)
|
||||
sentry-rails (5.23.0)
|
||||
railties (>= 5.0)
|
||||
sentry-ruby (~> 5.23.0)
|
||||
sentry-ruby (5.23.0)
|
||||
bigdecimal
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
slack-ruby-client (2.5.2)
|
||||
faraday (>= 2.0)
|
||||
faraday-mashify
|
||||
@@ -497,6 +503,8 @@ DEPENDENCIES
|
||||
rails (~> 8.0.2)
|
||||
rubocop-rails-omakase
|
||||
selenium-webdriver
|
||||
sentry-rails
|
||||
sentry-ruby
|
||||
slack-ruby-client
|
||||
solid_cable
|
||||
solid_cache
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<%# Includes all stylesheet files in app/assets/stylesheets %>
|
||||
<%= stylesheet_link_tag :app %>
|
||||
<%= javascript_importmap_tags %>
|
||||
<%= Sentry.get_trace_propagation_meta.html_safe %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
9
config/initializers/sentry.rb
Normal file
9
config/initializers/sentry.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Sentry.init do |config|
|
||||
config.dsn = ENV["SENTRY_DSN"]
|
||||
config.breadcrumbs_logger = [ :active_support_logger, :http_logger ]
|
||||
config.send_default_pii = true
|
||||
config.traces_sample_rate = 1.0
|
||||
config.profiles_sample_rate = 1.0
|
||||
end
|
||||
Reference in New Issue
Block a user