Skip to content
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

Fix new relic instrumentation #331

Merged
merged 1 commit into from Oct 17, 2016
Merged

Fix new relic instrumentation #331

merged 1 commit into from Oct 17, 2016

Conversation

hydrogen18
Copy link
Contributor

It looks like no one gave the new relic instrumentation any love in the 2.0.0 upgrade.

It fails for me in production, because the actual parameters are different in 2.0.0.

This fixes it for me.

@pezra
Copy link
Contributor

pezra commented Oct 12, 2016

Is there a test we could write so that does get missed next time?

@hydrogen18
Copy link
Contributor Author

Since this is basically a monkey patch we would have to do something bizarre inside a test, such as:

  1. Stub out NewRelic
  2. Save the old method as a reference
  3. Require the file
  4. Verify the function was monkey patch
  5. Verify the arity of the monkey patch matches the new one
  6. Verify the monkey patch calls the original method
  7. Restore the original method

@hydrogen18
Copy link
Contributor Author

Let me know if that strategy sounds acceptable for a test, or outline another one. The test will likely be more brittle than the code it is covering.

@pezra
Copy link
Contributor

pezra commented Oct 17, 2016

@hydrogen18, have a test that convoluted is unappealing (🙂 as, i suspect, was the intent of your description). Let's skip it for now.

@pezra pezra merged commit eb3905c into cequel:master Oct 17, 2016
@pezra
Copy link
Contributor

pezra commented Oct 17, 2016

Released in 2.0.2

@hydrogen18 hydrogen18 deleted the fix-new-relic branch October 17, 2016 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants