Skip to content

Commit

Permalink
Updated references for capture_params
Browse files Browse the repository at this point in the history
  • Loading branch information
NatalieWolfe committed Mar 5, 2018
1 parent c79420e commit 3497d47
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
30 changes: 21 additions & 9 deletions Migration Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,29 @@ event, add a listener and handle the error as appropriate for your application.

### Updated configuration options

In `newrelic.js`, edit the configuration properties you use for compatiblity with the latest versions:
In `newrelic.js`, edit the configuration properties you use for compatibility
with the latest versions:

* `capture_params`

Replaced with `attributes.enabled`. By default, request attributes are not sent to New Relic. Set `attributes.enabled`: true to include agent-defined or custom attributes in traces.
Replaced with `attributes.enabled`. By default, request attributes are not
sent to New Relic. Set `attributes.enabled`: true to include agent-defined or
custom attributes in traces.

* `ignored_params`

Replaced with `attributes.exclude`. Add any request attribute keys to the `attributes.exclude` list. Now, instead of having to be an exact match, wildcards (`*`) may be appended to each item for broader filtering.

**NOTE**: The new properties also have overrides for specific destinations (`transaction_tracer`, `transaction_events`, `error_collector`, and `browser_monitoring`). For example, setting `transaction_tracer.attributes.enabled: false`, would restrict attributes from being collected in transaction traces, while still allowing them for all others, assuming the root `attributes.enabled` is `true`. Please see [Node.js agent configuration](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration) for more details.
Replaced with `attributes.exclude`. Add any request attribute keys to the
`attributes.exclude` list. Now, instead of having to be an exact match,
wildcards (`*`) may be appended to each item for broader filtering.

**NOTE**: The new properties also have overrides for specific destinations
(`transaction_tracer`, `transaction_events`, `error_collector`, and
`browser_monitoring`). For example, setting
`transaction_tracer.attributes.enabled: false`, would restrict attributes from
being collected in transaction traces, while still allowing them for all others,
assuming the root `attributes.enabled` is `true`. Please see
[Node.js agent configuration](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration)
for more details.

### Deprecated API Methods
These methods have been marked as deprecated in Agent v2 and will be removed in
Expand All @@ -59,11 +71,11 @@ v3.
* `newrelic.createBackgroundTransaction()`

Replace with `newrelic.startBackgroundTransaction()` and `newrelic.getTransaction()`.

* `newrelic.addCustomParameter()`

Replace with `newrelic.addCustomAttribute()`.

* `newrelic.addCustomParameters()`

Replace with `newrelic.addCustomAttributes()`.
Expand Down Expand Up @@ -94,11 +106,11 @@ v3.
including those already instrumented by the Node Agent. See our
[instrumentation tutorials][instrumentation-tutorial] for more information
on using these methods.

* `newrelic.addCustomAttribute()`

Use this method to add a custom trace attribute.

* `newrelic.addCustomAttributes()`

Use this method to add multiple custom trace attributes.
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,24 +341,25 @@ a number of important services are also using Restify. Both frameworks map
routes to handlers, and both use a similar pattern to do so: they match one or
more HTTP methods (e.g. `GET` or the ever-popular `OPTIONS` – let's hear it for
CORS) along with a potentially parameterized path (e.g. `/user/:id`) or a
regular expression (e.g. `/^/user/([-0-9a-f]+)$/`). New Relic will capture
both those pieces of information in the request name. If you have support for
slow transaction traces and have enabled `capture_params`, the transaction
trace will also have the request's parameters and their values attached to it.
Likewise, request parameters and their values will be attached to any errors
recorded by the agent.
regular expression (e.g. `/^/user/([-0-9a-f]+)$/`). New Relic will capture both
those pieces of information in the request name. If you have support for slow
transaction traces and have included `request.parameters.*` attributes, the
transaction trace will also have the request's parameters and their values
attached to it. Likewise, request parameters and their values will be attached
to any errors recorded by the agent.

The only important thing to know about New Relic's support for Express, Restify,
or Hapi is that if you're dissatisfied with the names it comes up with, you can
use the API calls described below to come up with more descriptive names. Also,
if you use a different web framework or router and would like to see support
for it added, please let us know.
for it added, please check out
[custom intrumentation](https://newrelic.github.io/node-newrelic/docs/tutorial-Webframework-Simple.html).

### Request naming with the module API

The API is what's handed back from `require('newrelic')`, so

```javascript
```js
var newrelic = require('newrelic');
```

Expand Down

0 comments on commit 3497d47

Please sign in to comment.