> 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/delete-empty-values.md).

# Delete Empty Values

Removes empty values from telemetry. It deletes null values and, optionally, empty lists, empty maps, and configured "empty" string values from resource attributes, telemetry attributes, and a log record's body. Operates on logs, metrics, and traces.

### Supported Telemetry

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

### Configuration

<figure><img src="/files/iV2Lv2LsnyUE11H6rt6W" alt="Bindplane docs - Delete Empty Values - image 1"><figcaption></figcaption></figure>

**General**

| Parameter             | Type                                       | Required | Default                         | Description                                                                                                                                                                                      |
| --------------------- | ------------------------------------------ | -------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Choose Telemetry Type | Telemetry Selector                         | Yes      | `["Logs", "Metrics", "Traces"]` | The signals this processor acts on.                                                                                                                                                              |
| Deleted Values        | Enum: Null Values, Empty Lists, Empty Maps | Yes      | `["Null Values"]`               | Which value types to delete. **Null Values** removes both null values and zero-length (empty) strings. **Empty Lists** removes lists with no elements. **Empty Maps** removes maps with no keys. |

**Advanced**

| Parameter                | Type    | Required | Default   | Description                                                                                                                                                |
| ------------------------ | ------- | -------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Empty String Values      | Strings | No       | *(empty)* | A list of case-insensitive string values that should be treated as empty and deleted. For example, add `-` to delete fields whose value is a literal dash. |
| Exclude Resource Fields  | Strings | No       | *(empty)* | A list of resource field names to exclude from deletion.                                                                                                   |
| Exclude Attribute Fields | Strings | No       | *(empty)* | A list of attribute field names to exclude from deletion.                                                                                                  |
| Exclude Body Fields      | Strings | No       | *(empty)* | A list of log body field names to exclude from deletion.                                                                                                   |

Choose Telemetry Type can select more than one signal. The processor applies the same deletion rules to each selected signal.

### Examples

#### Remove dash-delimited empty fields from NGINX logs

NGINX access logs use `-` to denote an unset field (for example, a missing `remote_user` or `referer`). This configuration deletes null values and treats `-` as empty, so those placeholder fields are dropped from logs, metrics, and traces.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  name: delete-empty-values
spec:
  type: delete_empty_values
  parameters:
    - name: telemetry_types
      value:
        - Logs
        - Metrics
        - Traces
    - name: deleted_values
      value:
        - Null Values
    - name: empty_string_values
      value:
        - '-'
```

#### Delete nulls, empty lists, and empty maps while preserving a key

This configuration removes all three empty value types from logs but keeps the `host.name` resource field even when it is empty.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  name: delete-empty-values
spec:
  type: delete_empty_values
  parameters:
    - name: telemetry_types
      value:
        - Logs
    - name: deleted_values
      value:
        - Null Values
        - Empty Lists
        - Empty Maps
    - name: exclude_resource_keys
      value:
        - host.name
```

### Configuration Tips

* Enabling **Null Values** always removes zero-length strings in addition to true null values. Add entries to **Empty String Values** only for placeholder strings that are not actually empty, such as `-`, `null`, or `n/a`.
* **Empty String Values** matching is case-insensitive, so a single `null` entry deletes `NULL`, `Null`, and `null`.
* Use the **Exclude** fields to protect keys that must always be present downstream, even when their value is empty. Resource, attribute, and body exclusions are independent lists.
* Deletion is recursive, so emptying a nested map can leave its parent map empty. Enable **Empty Maps** to also remove the now-empty parent.

### Troubleshooting

#### Empty fields are still present after the processor runs

Symptoms: nulls or empty strings remain on records downstream.

Solutions:

1. Confirm **Choose Telemetry Type** includes the signal you are inspecting. The processor acts only on the selected signals.
2. Verify the field is not listed in one of the **Exclude** fields, which preserve keys regardless of value.

#### Placeholder strings like `-` are not removed

Symptoms: fields with a literal `-` or `n/a` value persist.

Solutions:

1. Add the placeholder string to **Empty String Values**. Only null and zero-length strings are deleted by default.
2. Matching is on the whole value, not a substring, so add each distinct placeholder you want treated as empty.

#### Empty maps remain even though their contents were removed

Symptoms: a map is emptied of keys but the map itself stays on the record.

Solutions:

1. Enable **Empty Maps** under **Deleted Values** so maps left empty after deletion are also removed.
2. Likewise enable **Empty Lists** to drop lists left with no elements.

### Standalone Processor

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  name: delete-empty-values
spec:
  type: delete_empty_values
  parameters:
    - name: telemetry_types
      value:
        - Logs
        - Metrics
        - Traces
    - name: deleted_values
      value:
        - Null Values
        - Empty Lists
        - Empty Maps
    - name: empty_string_values
      value:
        - '-'
        - 'null'
        - 'n/a'
    - name: exclude_resource_keys
      value:
        - host.name
    - name: exclude_attribute_keys
      value:
        - service.name
    - name: exclude_body_keys
      value:
        - message
```

### Related Resources

* [Remove Empty Values Processor — Bindplane OTel Collector reference](https://github.com/observIQ/bindplane-otel-collector/blob/main/processor/removeemptyvaluesprocessor/README.md)
* [Delete Fields](/integrations/processors/delete-fields.md)
* [Filter by Field](/integrations/processors/filter-by-field.md)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/integrations/processors/delete-empty-values.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
