mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 22:15:14 +00:00
only enable sentry on prod (#697)
This commit is contained in:
parent
d7e04e2b29
commit
79e74cb8a7
1 changed files with 12 additions and 10 deletions
|
|
@ -1,14 +1,16 @@
|
|||
# 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
|
||||
if Rails.env.production?
|
||||
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
|
||||
|
||||
# Enable sending logs to Sentry
|
||||
config.enable_logs = true
|
||||
# Patch Ruby logger to forward logs
|
||||
config.enabled_patches = [ :logger ]
|
||||
# Enable sending logs to Sentry
|
||||
config.enable_logs = true
|
||||
# Patch Ruby logger to forward logs
|
||||
config.enabled_patches = [ :logger ]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue