---
title: .NET attribute examples
source: https://docs.newrelic.com/docs/apm/agents/net-agent/attributes/net-attribute-examples
---

Here are examples of using attributes with the New Relic .NET agent.

## Disable all attributes [#example1]

In this example, attributes are disabled. The `include` and `exclude` lists will be ignored, and all attributes will be filtered out.

**Configuration:**

```xml
<attributes enabled="false" />
```

**Input keys:**

```
foo, bar, request.parameters.foo, request.parameters.bar
```

**Output for destinations:**

```yml
transaction_tracer: none
error_collector: none
transaction_events: none
browser_monitoring: none
```

## Select specific destinations [#example2]

In this example:

-   Attributes are disabled for transaction traces. The `include` and `exclude` lists will be ignored, and all attributes will be filtered out for this destination.
-   Attributes are disabled for browser monitoring by default.
-   Request parameters (prefixed with `request.parameters.`) are off by default for all destinations.

As a result, only `bar` is sent in traced errors and transaction events.

**Configuration:**

```xml
<attributes enabled="true">
  <exclude>foo</exclude>
</attributes>
<transactionTracer>
  <attributes enabled="false" />
</transactionTracer>
```

**Input keys:**

```
foo, bar, request.parameters.foo, request.parameters.bar
```

**Output for destinations:**

```yml
transaction_tracer: none
error_collector: bar
transaction_events: bar
browser_monitoring: none
```

## Select values and destinations [#example3]

In this example, specific input keys are selected for certain output destinations and excluded from others.

-   The `food.fruit.banana` key will be excluded only from transaction traces.
-   The `food` and `food.bread` keys will be excluded from all destinations.

**Configuration:**

```xml
<attributes enabled="true">
  <exclude>food*</exclude>
  <include>food.fruit.*</include>
</attributes>
<transactionTracer>
  <attributes enabled="true">
    <exclude>food.fruit.banana</exclude>
  </attributes>
</transactionTracer>
```

**Input keys:**

```
food, food.bread, food.fruit.banana, food.fruit.apple
```

**Output for destinations:**

```yml
transaction_tracer: food.fruit.apple
error_collector: food.fruit.banana, food.fruit.apple
transaction_events: food.fruit.banana, food.fruit.apple
browser_monitoring: food.fruit.banana, food.fruit.apple
```

## Emulating legacy server-side attribute behavior [#emulating]

In this example, the agent collects request parameters and records them to the transaction tracer and error collector destinations. This emulates enabling the legacy [server-side configuration](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/server-side-agent-configuration) settings for `Capture attributes` or `Capture parameters` options. Customize the following [`<attributes>`](https://docs.newrelic.com/docs/agents/net-agent/installation-configuration/net-agent-configuration#agent-attributes) elements in your .NET agent configuration file:

```xml
<transactionTracer>
  <attributes>
    <include>request.parameters*</include>
  </attributes>
</transactionTracer>

<errorCollector>
  <attributes>
    <include>request.parameters*</include>
  </attributes>
</errorCollector>
```
