-
Notifications
You must be signed in to change notification settings - Fork 166
Add custom proc support to FrontendLogger, simplify FrontendLogController #9117
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
Merged
aduth
merged 10 commits into
aduth-try-custom-error-logger
from
margolis-custom-error-procify
Aug 31, 2023
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
59b09b4
Add custom proc support to FrontendLogger, simplify FrontendLogContro…
zachmargolis e16ab67
Bring back parens around assignment inside a conditional
zachmargolis 8b31740
Use #public_send on method name so that AnalyticsEventEnhancer can do…
zachmargolis 80d8d0c
dedicated class?
aduth ae086b4
WIP: experimenting with less special-casing of Analytics class
zachmargolis 3d82f7d
Revert "WIP: experimenting with less special-casing of Analytics class"
zachmargolis ff8a00f
Slight simplification, support #call-able objects
zachmargolis a567375
Rename and document things for clarity
zachmargolis 3cdad4e
Lint is_a
aduth 9e28cb8
Fix issue with IdV::AnalyticsEventsEnhancer override
aduth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,7 @@ | ||
| class FrontendErrorLogger | ||
| class FrontendError < StandardError; end | ||
|
|
||
| def self.track_error(name:, message:, stack:) | ||
| NewRelic::Agent.notice_error(FrontendError.new, custom_params: { name:, message:, stack: }) | ||
| end | ||
| end |
This file contains hidden or 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 hidden or 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 hidden or 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
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.
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.
9e28cb8 fixes an issue with some specific events in IdV not working. I think this is also what
transform_valueswas helping with previously, since trying to get the method signature from theanalyticsinstance is going to have issues with howIdV::AnalyticsEventsEnhanceroverrides the method and loses the signature.identity-idp/app/services/idv/analytics_events_enhancer.rb
Line 39 in 9d5698a
We could also consider moving this back into
transform_values, and maybe there's even something where we can consolidate the handling so that theEVENT_MAPhash values are all the same type of callable thing? The issue comes with binding though... maybe we can have a small logic branch to normalize an unbound method to bind it withanalytics?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.
Re: bound vs unbound... I feel like we should have only one or the other? Seems like a lot of handling to manage both
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.
@zachmargolis How do you feel about the current implementation in this branch?
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.
I feel good! 🚢