-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capture exceptions in Action Cable connections and channels (continuation of #1295) #1638
Merged
st0012
merged 9 commits into
getsentry:master
from
choznerol:rails-action-cable-support
Dec 12, 2021
Merged
Capture exceptions in Action Cable connections and channels (continuation of #1295) #1638
st0012
merged 9 commits into
getsentry:master
from
choznerol:rails-action-cable-support
Dec 12, 2021
Conversation
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
There are 5 types of hooks that Action Cable provides: * `Connection#connect` * `Connection#disconnect` * `Channel#subscribed` * `Channel#unsubscribed` * `Channel` actions Now, any exceptions raised within those hooks are captured by Sentry, and reported as `ActionCable/[...]` transactions. Additional context is included depending on the hook the exception was raised within. A note/quirk: the Rack env that's included in the scope is from the `Connection`, and therefore has a URL of the cable `mount_path` (usually `/cable`) as well as the headers from that initial connection request. Additionally, there is not currently a really clean way to hook in and set `user_context`. I don't know if that is a blocker for this integration, but wanted to make sure it was noted.
choznerol
added a commit
to choznerol/sentry-ruby
that referenced
this pull request
Dec 9, 2021
choznerol
force-pushed
the
rails-action-cable-support
branch
from
December 9, 2021 15:00
5ddc80c
to
a5cadc9
Compare
choznerol
added a commit
to choznerol/sentry-ruby
that referenced
this pull request
Dec 9, 2021
choznerol
force-pushed
the
rails-action-cable-support
branch
from
December 9, 2021 15:06
a5cadc9
to
ad612c9
Compare
Similar to the update for ActionCableExtensions in getsentry#1218 and getsentry#1494
choznerol
added a commit
to choznerol/sentry-ruby
that referenced
this pull request
Dec 9, 2021
choznerol
force-pushed
the
rails-action-cable-support
branch
from
December 9, 2021 15:15
ad612c9
to
26d0aa0
Compare
choznerol
force-pushed
the
rails-action-cable-support
branch
from
December 10, 2021 04:25
26d0aa0
to
d09d114
Compare
st0012
approved these changes
Dec 12, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@choznerol @agrobbin thanks for adding this feature!
Awesome, thanks @choznerol @st0012! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Close #470
This is a continuation of #1295 (#1295 (comment))
Most of the features are already done in #1295, I only added:
Sentry::Rails::ActiveJobExtensions
did. When resolving conflict with the latest master, however, I realized the latter has changed a lot in Only extend ActiveJob when it's defined #1218 and Use ActiveSupport Lazy Load Hook to Apply ActiveJob Extension #1494. I try to updateSentry::Rails::ActionCableExtensions
in a similar fashion to prevent bugs like sentry + eager_load breaks ActiveJob rescue_from #1249.