Skip to content

Commit

Permalink
Omit config.release if git revision not available (i.e. in Docker)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Sep 26, 2023
1 parent aa70bd2 commit 9172740
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
config.before_send = lambda do |event, hint|
filter.filter(event.to_hash)
end
config.release = `git rev-parse --short HEAD`&.chomp("\n")
git_rev = `git rev-parse --short HEAD`&.chomp("\n")
config.release = git_rev if git_rev.present?
end
Sentry.configure_scope do |scope|
scope.set_context('app', {
Expand Down

0 comments on commit 9172740

Please sign in to comment.