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

# Delete Fields

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

## Description

The Delete Fields processor can be used to remove attributes, resource attributes, and log record body keys from telemetry in the pipeline.

<Admonition type="warning">
  Deleting Metric attributes may be unsound.

  Be careful when deleting metric attributes. Deleting attributes on metrics may cause multiple data points to have the same set of attributes, causing a datapoint collision.
</Admonition>

## 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.                                                                    |
| condition            | `string`            | `true`                          | An OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all telemetry. |
| body\_keys           | `string`            | `[]`                            | One or more body key names to remove from telemetry data. Note: Body fields are applicable only for logs.                 |
| attributes           | `string`            | `[]`                            | One or more attribute names to remove from telemetry data.                                                                |
| resource\_attributes | `string`            | `[]`                            | One or more resource attribute names to remove from telemetry data.                                                       |

## Example Configuration

This example configuration removes the "spid" body field, the "log.file.name" attribute, and the "host.id" resource attribute from any log record.

### Standalone Processor

```yaml theme={}
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: delete-fields-v2
  name: delete-fields-v2
spec:
  type: delete_fields-v2
  parameters:
    - type: delete_fields-v2
      parameters:
        - name: telemetry_types
          value: ['Logs']
        - name: condition
          value: 'true'
        - name: body_keys
          value:
            - spid
        - name: attributes
          value:
            - log.file.name
        - name: resource_attributes
          value:
            - host.id
```

### Configuration with Embedded Processor

```yaml theme={}
apiVersion: bindplane.observiq.com/v1
kind: Configuration
metadata:
  id: delete-fields-v2
  name: delete-fields-v2
  labels:
    platform: linux
spec:
  sources:
    - type: journald
      parameters:
        - name: units
          value: []
        - name: directory
          value: ''
        - name: priority
          value: info
        - name: start_at
          value: end
      processors:
        - type: delete_fields-v2
          parameters:
            - name: telemetry_types
              value: ['Logs']
            - name: condition
              value: 'true'
            - name: body_keys
              value:
                - spid
            - name: attributes
              value:
                - file.name
            - name: resource_attribute
              value:
                - host.id
  selector:
    matchLabels:
      configuration: delete-fields-v2
```
