-
-
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
Remove ActiveJob keys for both Sidekiq and DelayedJob #898
Remove ActiveJob keys for both Sidekiq and DelayedJob #898
Conversation
aee5baf
to
3221522
Compare
Looks like a minor Rubocop issue on this. |
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.
Thanks for the work! It looks good in general, just added some small suggestions. Can you rebase it against master as well?
Codecov Report
@@ Coverage Diff @@
## v3-1-stable #898 +/- ##
==============================================
Coverage ? 98.17%
==============================================
Files ? 57
Lines ? 2466
Branches ? 0
==============================================
Hits ? 2421
Misses ? 45
Partials ? 0 Continue to review full report at Codecov.
|
lib/raven/context_filter.rb
Outdated
private | ||
|
||
def filter_context_hash(key, value) | ||
(key = key[3..-1]) if key[0..3] == ACTIVEJOB_RESERVED_PREFIX |
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.
This will remove only the first 3 chars from the key. Like so _aj_symbol_keys
=> _symbol_keys
. Should I remove this _
in the beginning as well?
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.
can we do it with substitution instead? like
ACTIVEJOB_RESERVED_PREFIX_REGEX = /^_aj_/.freeze
key = key.sub(ACTIVEJOB_RESERVED_PREFIX_REGEX, "") if key.match?(ACTIVEJOB_RESERVED_PREFIX_REGEX)
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.
overall looks good 👍 could be merged into 3.1, just need some updates
lib/raven/context_filter.rb
Outdated
private | ||
|
||
def filter_context_hash(key, value) | ||
(key = key[3..-1]) if key[0..3] == ACTIVEJOB_RESERVED_PREFIX |
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.
can we do it with substitution instead? like
ACTIVEJOB_RESERVED_PREFIX_REGEX = /^_aj_/.freeze
key = key.sub(ACTIVEJOB_RESERVED_PREFIX_REGEX, "") if key.match?(ACTIVEJOB_RESERVED_PREFIX_REGEX)
@alissonbrunosa sorry that I forgot to change the base of this PR 🤦♂️ because we have started the restructuring work of version 4.0, all the previously-opened contributions should be merged into so I wonder if you can revert your merge of the master and merge/rebase |
- Add spec for context filter - Use context filter for both Sidekiq and DelayedJOb - fixing specs
f8ab981
to
44979cd
Compare
@st0012 don't worry 😅 |
@alissonbrunosa thanks for the work and sorry again for the hassles 😅 |
It's as same as #386 but for both Sidekiq and DelayedJob
The difference is instead of rename the key I removed it, because this key will not be used.