> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/integrations/processors/filter-by-condition/filter-by-field-deprecated.md).

# Filter by Fields (Deprecated)

{% hint style="info" %}
**NOTE**

This processor has been deprecated and replaced with a new [Filter by Condition](/integrations/processors/filter-by-condition.md) processor. While it will continue to function, it will no longer receive any enhancements and you should migrate to the new processor.
{% endhint %}

### 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.

### 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**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2Fgit-blob-5714b8d115a049c5c844e8d3c49f7bda665edfb0%2Fintegrations-processors-filter-by-field-image-1.png?alt=media" alt="Bindplane docs - Filter by Field - image 1"><figcaption></figcaption></figure>

**Standalone Processor**

```yaml
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
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bindplane.com/integrations/processors/filter-by-condition/filter-by-field-deprecated.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
