-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0774b17
commit b58a51c
Showing
5 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0.4 | ||
3.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ruby 3.0.4 | ||
ruby 3.3.1 | ||
yarn 1.22.19 | ||
nodejs 16.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
module SentryUserContext | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
before_action :set_sentry_context | ||
end | ||
|
||
private | ||
|
||
def sentry_user_context | ||
{}.tap do |user| | ||
next unless current_user | ||
|
||
user[:id] = current_user.id | ||
user[:name] = current_user.name | ||
end | ||
end | ||
|
||
def set_sentry_context | ||
Sentry.set_user(sentry_user_context) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
Sentry.init do |config| | ||
config.dsn = ENV["SENTRY_DSN"] | ||
config.breadcrumbs_logger = [:active_support_logger, :http_logger] | ||
config.enable_tracing = true | ||
config.enabled_environments = %w[production] | ||
end | ||
|