This describes the rules New Relic uses to determine which attributes to include or exclude for a destination. This also includes a summary of the .NET agent properties that were no longer available with the release of New Relic agent attributes in versions 9.0 or higher.
Attribute rules
New Relic follows these rules to determine which attributes to include or exclude:
The attributes.enabled
field overrides all other settings. When false
, no attributes will be reported to New Relic.
Example configuration:
<attributes enabled="false"> <include>foo</include> <include>bar</include></attributes><transactionTracer enabled="true"> <attributes enabled="true"/></transactionTracer>
Example output:
Keys passed in: foo, bar, batKeys included for all destinations:Keys excluded for all destinations: foo, bar, bat
The {destination}.attributes.enabled
flags take precedence over include and exclude keys.
Example configuration:
<attributes enabled="true"> <include>one</include> <include>two</include></attributes><transactionTracer enabled="true"> <attributes enabled="false"> <include>three</include> <include>four</include> </attributes></transactionTracer>
Example output:
Keys passed in: one, two, three, fourKeys included for transaction traces:Keys excluded for transaction traces: one, two, three, four
If a destination is enabled, all user attributes are sent to that destination by default.
All user attributes default to true
. However, by default, request attributes and message parameters are disabled for all destinations.
Example configuration:
<attributes enabled="true"> <exclude>myAttKey</exclude></attributes>
Example output:
Keys passed in: foo, bar, myAttKeyKeys included: foo, barKeys excluded: myAttKey
If the same key is listed in the include and exclude lists, then attributes with the specified key will be excluded.
Example configuration:
<attributes enabled="true"> <include>foo</include> <include>myCustomAtt</include> <exclude>password</exclude> <exclude>myCustomAtt</exclude></attributes>
Example output:
Keys passed in: foo, myCustomAtt, passwordKeys included: fooKeys excluded: password, myCustomAtt
Keys are case sensitive.
Example configuration:
<attributes enabled="true"> <exclude>password</exclude> <exclude>PaSsWoRd</exclude></attributes>
Example output:
Keys passed in: password, Password, PASSWORD, PaSsWoRd, PassWORDKeys included: Password, PASSWORD, PassWORDKeys excluded: password, PaSsWoRd
You can use an asterisk *
at the end of a key as a wildcard. This will match all attributes with the same prefix.
Example configuration:
<attributes enabled="true"> <include>custom*</include> <exclude>request.parameters.*</exclude></attributes>
Example output:
Keys passed in: custom, custom.key1, custom.key2, request.parameters., request.parameters.foo, request.parameters.barKeys included: custom, custom.key1, custom.key2Keys excluded: request.parameters., request.parameters.foo, request.parameters.bar
If multiple include or exclude attributes affect the same key, the most specific setting will have priority.
Example configuration:
<attributes enabled="true"> <include>request.parameters.foo</include> <exclude>request.parameters.*</exclude></attributes>
Example output:
Keys passed in: request.parameters., request.parameters.foo, request.parameters.barKeys included: request.parameters.fooKeys excluded: request.parameters., request.parameters.bar
If the attribute include
or exclude
is specified on a destination, then it only impacts that destination.
Example configuration:
<attributes enabled="true"> <include>foo</include></attributes><transactionEvents enabled="true"> <attributes enabled="true"> <exclude>foo</exclude> </attributes></transactionEvents>
Example output:
Keys passed in: fooKeys included for transaction events:Keys included for other destinations: fooKeys excluded for transaction events: foo
Obsolete properties
The following properties are not available in the .NET agent v9.0. Please visit the .NET agent 8.x to 9.x migration guide page for replacement properties when upgrading your .NET agent.
The analyticsEvents
element in newrelic.config is obsolete. Enable the transactionEvents
element in newrelic.config:
<transactionEvents enabled="true"/>
By default, request parameters are not sent to New Relic. Add request.parameters.*
to the attributes.include
list to enable request parameter collection.
<attributes> <include>request.parameters.*</include></attributes>
The parameterGroups
value and its enabled
and ignore
settings are obsolete. By default, customParameters
and responseHeaderParameters
are instrumented, while serviceRequestParameters
are not instrumented. To customize these settings:
Use the
enabled
flag to enable instrumentation.Use
include
andexclude
to toggle instrumentation for specific attributes.For example:
<attributes enabled="true"><include>service.request.*</include><exclude>response.headers.*</exclude><exclude>myCustomApiKey.*</exclude></attributes>For more information on configuring attributes, see the attributes examples.
The capture attributes flag on browserMonitoring
, transactionTracer
, transactionEvents
, and errorCollector
is obsolete. Instead, use the attributes
sub-element to configure attribute settings for each of these destinations.
New property | Example |
---|---|
| |
| |
| |
|