> ## 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 Empty Values

<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 Empty Values processor can be used to delete null and other empty values from telemetry resource attributes, telemetry attributes, or a log record's body.

## 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.                                                                                                                                                                                                                                                                     |
| deleted\_values          | `enums`             | `["Null Values"]`               | List of values types to delete. May include "Null Values", "Empty Lists", and "Empty Maps". Enabling "Null Values" will remove both empty (zero-length) strings and entirely empty values. Enabling "Empty Lists" will delete empty (no element) list values. Enabling "Empty Maps" will delete empty (no key) map values. |
| exclude\_resource\_keys  | `strings`           | `[]`                            | List of resource keys to exclude from deletion.                                                                                                                                                                                                                                                                            |
| exclude\_attribute\_keys | `strings`           | `[]`                            | List of attribute keys to exclude from deletion.                                                                                                                                                                                                                                                                           |
| exclude\_body\_keys      | `string`            | `[]`                            | List of body keys to exclude from deletion.                                                                                                                                                                                                                                                                                |
| empty\_string\_values    | `strings`           | `[]`                            | List of string values that are considered "empty". String fields will be deleted if they match any of the strings in this list.                                                                                                                                                                                            |

## Example Configuration

This example configuration removes empty values from NGINX logs, where "-" is used to denote an empty field.

### Web Interface

<img src="https://mintcdn.com/honeycomb/ibXJI2unoLZRp0G4/_assets/images/htp/xnapper-delete-empty-values.png?fit=max&auto=format&n=ibXJI2unoLZRp0G4&q=85&s=4b2d150ee936aeca2439748e8ef7a16b" alt="Honeycomb Docs - Delete Empty Values - image 1" width="1838" height="1790" data-path="_assets/images/htp/xnapper-delete-empty-values.png" />

### Standalone Processor

```yaml theme={}
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: remove-empty-attributes
  name: remove-empty-attributes
spec:
  type: remove_empty_values
  parameters:
    - name: telemetry_types
      value:
        - Logs
        - Metrics
        - Traces
    - name: empty_string_values
      value:
        - '-'
```

### Configuration with Embedded Processor

```yaml theme={}
apiVersion: bindplane.observiq.com/v1
kind: Configuration
metadata:
  id: remove-empty-attributes
  name: remove-empty-attributes
  labels:
    platform: linux
spec:
  sources:
    - type: nginx
      parameters:
        - name: telemetry_types
          value:
            - Logs
            - Metrics
        - name: endpoint
          value: http://localhost:80/status
        - name: disable_metrics
          value: []
        - name: enable_tls
          value: false
        - name: insecure_skip_verify
          value: false
        - name: ca_file
          value: ''
        - name: cert_file
          value: ''
        - name: key_file
          value: ''
        - name: collection_interval
          value: 60
        - name: data_flow
          value: high
        - name: log_format
          value: default
        - name: access_log_paths
          value:
            - /var/log/nginx/access.log*
        - name: error_log_paths
          value:
            - /var/log/nginx/error.log*
        - name: start_at
          value: end
      processors:
        - type: delete_empty_values
          parameters:
            - name: telemetry_types
              value:
                - Logs
                - Metrics
                - Traces
            - name: deleted_values
              value:
                - Null Values
            - name: exclude_resource_keys
              value: []
            - name: exclude_attribute_keys
              value: []
            - name: exclude_body_keys
              value: []
            - name: empty_string_values
              value:
                - '-'
          disabled: false
      disabled: false
  selector:
    matchLabels:
      configuration: remove-empty-attributes
```
