-
Notifications
You must be signed in to change notification settings - Fork 600
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
hotfix: prevent exception in record_one_broadcast_with_new_relic #2510
Conversation
145c152
to
7cac1f9
Compare
7cac1f9
to
8f76e26
Compare
yield | ||
broadcasts.each { |broadcasted_logger| broadcasted_logger.instance_variable_set(:@skip_instrumenting, false) } | ||
else | ||
::NewRelic::Agent.record_custom_event('NR Error - record_one_broadcast_with_new_relic - nil broadcasts', {}) |
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.
Is there a something you hoped to get out of using record_custom_event
?
We'd typically log an error instead, something like:
::NewRelic::Agent.record_custom_event('NR Error - record_one_broadcast_with_new_relic - nil broadcasts', {}) | |
NewRelic::Agent.logger.error('Error recording broadcasted logger') |
Hi @nathan-appere! Thank you so much for this contribution. I've left one small comment and we will need the Contributor License Agreement signed before merging ◡̈ |
Hey @hannahramadan thanks for having a look, I ended up not deploying as it seems a bit dangerous to have a Rails version with random errors 🤔 |
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.
Thank you for getting this updated and signing the CLA!
Before contributing, please read our contributing guidelines and code of conduct.
Overview
Describe the changes present in the pull request
Submitter Checklist:
Testing
The agent includes a suite of unit and functional tests which should be used to
verify your changes don't break existing functionality. These tests will run with
GitHub Actions when a pull request is made. More details on running the tests locally can be found
here for our unit tests,
and here for our functional tests.
For most contributions it is strongly recommended to add additional tests which
exercise your changes.
Reviewer Checklist