Skip to content
This repository was archived by the owner on Sep 21, 2025. It is now read-only.

Conversation

@benslater
Copy link
Contributor

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.

@codecov
Copy link

codecov bot commented May 23, 2019

Codecov Report

Merging #114 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
lib/roo_on_rails/concerns/require_api_key.rb 90.47% <ø> (-0.23%) ⬇️
.../roo_on_rails/routemaster/lifecycle_events_spec.rb 100% <100%> (ø) ⬆️
spec/support/build_test_app.rb 98.7% <100%> (ø) ⬆️
lib/roo_on_rails/rack/populate_env_from_jwt.rb 98.41% <100%> (ø) ⬆️
lib/roo_on_rails/routemaster/lifecycle_events.rb 100% <100%> (+3.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d18f10...7f5ca8c. Read the comment docs.

Copy link

@rxbynerd rxbynerd left a 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")

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?

kplattret
kplattret previously approved these changes May 24, 2019
Copy link
Contributor

@kplattret kplattret left a 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!

@VSpike VSpike self-requested a review May 24, 2019 11:17
VSpike
VSpike previously approved these changes May 24, 2019
Copy link
Contributor

@VSpike VSpike left a 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
Copy link
Contributor

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.pre1 so 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.

Copy link
Contributor

@gregbeech gregbeech left a 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

@benslater benslater dismissed stale reviews from VSpike and kplattret via fca52c9 May 24, 2019 14:41
farthir
farthir previously approved these changes May 24, 2019
Copy link

@farthir farthir left a 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)
Copy link

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?

Copy link
Contributor Author

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)
Copy link

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?

farthir
farthir previously approved these changes May 28, 2019
farthir
farthir previously approved these changes May 28, 2019
VSpike
VSpike previously approved these changes May 28, 2019
kplattret
kplattret previously approved these changes May 28, 2019
@benslater benslater merged commit 7cab239 into master May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants