Skip to content

Commit 4ecd767

Browse files
authored
Update README.md
1 parent 1fbf756 commit 4ecd767

1 file changed

Lines changed: 29 additions & 32 deletions

File tree

README.md

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ All configuration of this extension is done in `newrelic.yml` or alternatively,
3434
1. See the [renaming options](#transactionnamer-renaming-options) to determine which to use.
3535
1. Ensure that the indentation levels of the `httpservlet_transaction_namer` section match exactly to the way they appear in the template below. **Every indentation in YAML is 2 spaces (_NOT_ tabs)**. The `httpservlet_transaction_namer:` line should have exactly 2 spaces in front of it, the next line should have 4, and so on.
3636

37+
38+
3739
### Configuration Template
3840

3941
```yaml
@@ -212,6 +214,27 @@ _Pattern 4: Replace regex pattern everywhere in URL path_
212214
* `/VehicleApplication/AB1CDE2EFGH567890` grouped as `/VehicleApplication/<obfuscatedVin>`
213215
* `/VehicleApplication/AB1CDE2EFGH567890/AnotherSegment/IJ1KLM2NOPQ567890/TheEnd` grouped as `/VehicleApplication/<obfuscatedVin>/AnotherSegment/<obfuscatedVin>/TheEnd`
214216

217+
#### Excluding request.uri attribute
218+
219+
The most recent Java agent versions have introduced constraints on altering agent attributes. This makes it necessary to exclude the "request.uri" attribute and utilize the obfuscated "custom.request.uri" instead. To apply this change, navigate to the newrelic.yml file, locate the "attributes" section, and modify the "exclude" parameter as described below:
220+
221+
```yaml
222+
# Provides the ability to configure the attributes sent to New Relic. These
223+
# attributes can be found in transaction traces, traced errors,
224+
# transaction events, and page views.
225+
attributes:
226+
227+
# When true, attributes will be sent to New Relic. The default is true.
228+
enabled: true
229+
#A comma separated list of attribute keys whose values should
230+
# be sent to New Relic.
231+
#include:
232+
233+
# A comma separated list of attribute keys whose values should
234+
# not be sent to New Relic.
235+
exclude: request.uri
236+
```
237+
215238
### Custom instrumentation
216239

217240
Additional custom instrumentations can be created as follows.
@@ -257,38 +280,12 @@ configuration (newrelic.yml) as follows.
257280

258281
## Building
259282

260-
This project uses the Gradle build technology for building the distributable
261-
assets. The Gradle `distribution` plugin is used to actually build the
262-
distribution file that can be provided to customers.
263-
264-
To build the distribution, perform the following steps.
265-
266-
1. Clone this repository
267-
268-
```sh
269-
git clone https://source.datanerd.us/sdewitt/httpservlet-transaction-namer
270-
```
271-
272-
1. Build the distribution
273-
274-
```sh
275-
cd httpservlet-transaction-namer
276-
./gradlew clean build buildPdf distZip
277-
```
278-
279-
This will produce the following asset in the build directory:
280-
281-
```
282-
./build/distributions/httpservlet-transaction-namer-VERSION.zip
283-
```
284-
285-
The Zip contents will be as follows
286-
287-
| Asset | Description |
288-
| --- | --- |
289-
| httpservlet-transaction-namer-2.1.jar | The extension JAR file |
290-
| README.pdf | The PDF instructions for usage |
291-
| javadoc/* | The public API documentation |
283+
If you make changes to the instrumentation code and need to build the instrumentation jars, follow these steps
284+
1. Set environment variable NEW_RELIC_EXTENSIONS_DIR. Its value should be the directory where you want to build the jars (i.e. the extensions directory of the Java Agent).
285+
2. Build one or all of the jars.
286+
a. To build one jar, run the command: gradlew httpservlet-transaction-namer:clean httpservlet-transaction-namer:install
287+
b. To build all jars, run the command: gradlew clean install
288+
3. Restart the application
292289

293290
## Testing
294291

0 commit comments

Comments
 (0)