> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeycomb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Filter by Field

<Badge className="hny-badge-enterprise-addon" stroke>Ent+</Badge>

<Note>
  This feature is available as an add-on for the [Honeycomb Enterprise plan](https://www.honeycomb.io/pricing/).
  Please contact your Honeycomb account team for details.
</Note>

## Filter by Field Processor

The Filter by Field processor can be used to include or exclude telemetry based on matched resource attributes, attributes, or log body fields.

<Warning>
  This processor has been deprecated and replaced with a new [Filter by Condition](/send-data/telemetry-pipeline/processors/filter-by-condition) processor.
  While it will continue to function, it will no longer receive any enhancements and you should migrate to the new processor.
</Warning>

## Supported Types

| Metrics | Logs | Traces |
| :------ | :--- | :----- |
| ✓       | ✓    | ✓      |

## Configuration Table

| Parameter        | Type                | Default                         | Description                                                                                                                                                                  |
| :--------------- | :------------------ | :------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| telemetry\_types | `telemetrySelector` | `["Logs", "Metrics", "Traces"]` | The list of telemetry types the processor will act on.                                                                                                                       |
| action           | `enum`              | `exclude`                       | Whether to `include` (retain) or `exclude` (drop) matches.                                                                                                                   |
| match\_type      | `enum`              | `strict`                        | Method for matching values. Strict matching requires that 'value' be an exact match. Regexp matching uses [re2](https://github.com/google/re2/wiki/Syntax) to match a value. |
| attributes       | `map`               | `[]`                            | Attribute key value pairs to filter on. Telemetry is filtered if all attribute, resource, and body key pairs are matched.                                                    |
| resources        | `map`               | `[]`                            | Resource key value pairs to filter on. Telemetry is filtered if all attribute, resource, and body key pairs are matched.                                                     |
| bodies           | `map`               | `[]`                            | Log body key value pairs to filter on. Log records filtered if all attribute, resource, and body key pairs are matched.                                                      |

## Example Configuration

### Excluding matching log records

In this example, we exclude logs that have **all** of the following:

* A `host.name` resource attribute that equals `dev-server`
* An `environment` attribute that equals `dev`
* A `remote-ip` log body field that equals `127.0.0.1`

#### Web Interface

<img src="https://mintcdn.com/honeycomb/ibXJI2unoLZRp0G4/_assets/images/htp/xnapper-filter-field.png?fit=max&auto=format&n=ibXJI2unoLZRp0G4&q=85&s=f50ba63bb797dc97166d0a9218b4349a" alt="Honeycomb Docs - Filter by Field - image 1" width="1626" height="2002" data-path="_assets/images/htp/xnapper-filter-field.png" />

#### Standalone Processor

```yaml theme={}
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: filter_field
  name: filter_field
spec:
  type: filter_field
  parameters:
  - name: telemetry_types
    value:
    - Metrics
    - Logs
    - Traces
  - name: action
   value: exclude
  - name: match_type
   value: strict
  - name: attributes
   value:
    environment: dev
  - name: resources
   value:
    host.name: dev-server
  - name: bodies
   value:
    remote-ip: 127.0.0.1
```
