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

capture_params doesn't work for error capture #127

Closed
scottlingran opened this issue Mar 17, 2014 · 6 comments
Closed

capture_params doesn't work for error capture #127

scottlingran opened this issue Mar 17, 2014 · 6 comments
Labels

Comments

@scottlingran
Copy link

This strips the url of query strings and thus renders the capture_params argument useless, especially for Error Collecting.

https://github.com/newrelic/node-newrelic/blob/master/lib/transaction.js#L-103

this.url = urltils.scrub(requestURL);

I forked/hacked around this for personal deployment, but it'd be nice to have this in the main library

@othiym23
Copy link
Contributor

Hey Scott,

This is a bug, but it only kicks in if the error is raised after the transaction's name has been set, which happens at the end of the request. At the creation of the transaction, it gets the full URL, which will be used in most error cases. I agree there's a bug here, but just not stripping the parameters off the URL will lead to another, even more subtle bug. We should probably be capturing the raw URL and then setting .url to a scrubbed version. We'll look at getting this fixed soon.

@davetapley
Copy link

@othiym23 I've been having trouble with this as well.
See my test app here.

I've tried:

  • Setting capture_params : true in newrelic.js, and:
  • Setting an env var CAPTURE_PARAMS=true, and:
  • Switching to configure via web UI (as opposed to newrelic.js) and enabling here:
    selection_130

In all three cases, when I hit /500?foo=bar I get a traced error, but also:

No parameters were recorded for this error. Enable automatic annotation of your errors with HTTP parameters or read the documentation on recording parameters with your requests.

What gives? 😒

@groundwater
Copy link
Contributor

This is an amazing bug report.

I'm looking at it now!

@groundwater
Copy link
Contributor

Hi @dukedave, very sorry about this. We just did this part wrong. We're going to have to fix how capture_params works (or doesn't work) for errors.

Your test app was fantastic, and much appreciated.

I will get fixing this into our queue, and let you know as soon as it's released.

@gogreen53
Copy link

We have this issue as well. Can we get an update on the status?

@txase
Copy link

txase commented Jun 17, 2014

I believe we have fixed this in our latest release, version 1.7.2. Can people give that a spin and see if it resolves things?

Thanks!

@txase txase added bug labels Jun 26, 2014
@wesrog wesrog closed this as completed Jun 10, 2019
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 16, 2024
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 19, 2024
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 23, 2024
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants