- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4
 
Remove New Relic #114
Remove New Relic #114
Conversation
          Codecov Report
 @@            Coverage Diff             @@
##           master     #114      +/-   ##
==========================================
- Coverage   93.34%   93.26%   -0.09%     
==========================================
  Files          93       92       -1     
  Lines        2751     2702      -49     
==========================================
- Hits         2568     2520      -48     
+ Misses        183      182       -1
 Continue to review full report at Codecov. 
  | 
    
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.
Minor about losing exception details
| rescue => e | ||
| NewRelic::Agent.notice_error(e) | ||
| # SENTRY: To be migrated once we're on sentry | ||
| Rails.logger.error("#{e.inspect} rescued in #{self.class.name}::publish_event") | 
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 unfortunately won't get surfaced anywhere meaningful — can we do something like Raven.report_exception(e) if defined?(Raven) or something, to make sure we're not losing these?
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.
LGTM – thanks for doing this @btslater!
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 doing this @btslater !
        
          
                CHANGELOG.md
              
                Outdated
          
        
      | @@ -1,3 +1,9 @@ | |||
| # v2.0.0 | |||
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.
Two questions:
- Did you update the gem version? I can't see a version change in the code itself?
 - Given we probably want to remove a bunch of other Heroku/Hirefile related stuff (see "NEXT" open PR) would it be worth using something like 
2.0.0.pre1so we can do a bunch of pre-releases before getting to the final 2.0.0 with everything gone? Otherwise each removal will be another major version, then we'll be up to a much bigger number very soon. 
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.
LGTM, just a question around versions
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.
LGTM! Just a couple of minor comments about logging the notice_errors
| rescue UnacceptableKeyError, JSON::JWT::Exception => e | ||
| # Identifying user is clearly attempting to hack or has been given a totally incorrect | ||
| # token, log this and flag as Forbidden, without executing the rest of the middleware stack. | ||
| ::NewRelic::Agent.notice_error(e) if defined?(NewRelic) | 
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.
Would it be worth logging this with Rails.logger and Raven as below?
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.
Worth logging with Raven - but Rails isn't in scope here so we can't use logger
| publisher.publish!(force_publish: force_publish) | ||
| rescue => e | ||
| NewRelic::Agent.notice_error(e) | ||
| Raven.report_exception(e) if defined?(Raven) | 
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.
Might also be worth logging with Rails.logger so it's still recorded in Datadog for services without Sentry?
…to roo_on_rails-2.0-remove-new-relic
Given that we are moving off New Relic at the end of the month, remove the New Relic gem and all the code associated with it.