Skip to content

Commit

Permalink
Merge pull request #19457 from brnhensley/patch-4
Browse files Browse the repository at this point in the history
chore: expand the query/route parameter section
  • Loading branch information
WriteMayur authored Dec 6, 2024
2 parents 1eb10f3 + 9929e46 commit 49f45f0
Showing 1 changed file with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2831,7 +2831,16 @@ This section defines the Node.js agent variables in the order they typically app
</tbody>
</table>

Prefix of attributes to exclude from transaction events. Allows `*` as wildcard at end.
Prefix of attributes to exclude from transaction events. Allows `*` as wildcard at end. For example, in the config file, this would include all parameters except `somethingSecret`:

```js

attributes: {
include: [ 'request.parameters.*' ],
exclude: [ 'request.parameters.somethingSecret' ]
}
```

</Collapser>

<Collapser
Expand Down Expand Up @@ -2872,7 +2881,34 @@ This section defines the Node.js agent variables in the order they typically app
</tbody>
</table>

Prefix of attributes to include in transaction events. Allows `*` as wildcard at end.
Prefix of attributes to include in transaction events. Allows `*` as wildcard at end.

For example, in the `config` file, this would include all parameters:

```js

attributes: {
include: [ 'request.parameters.*' ]
}

```

Enter the following Express route definition and request URL:

```js

app.get('/api/users/:id', myMiddleware, myController)

```

```sh

curl http://localhost:3000/api/users/abc123?id=true

```

The `_route_ parameter` is `id`, and has a value of `abc123`. This becomes `request.parameters.route.id: abc123` on the Transaction, root Segment, and Span attributes. This example also has a `_query_ parameter `of `id`, which has a value of `true`. This would become `request.parameters.id: true` on the Transaction, root Segment, and Span attributes.

</Collapser>
</CollapserGroup>

Expand Down

0 comments on commit 49f45f0

Please sign in to comment.