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

chore: expand the query/route parameter section #19457

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading