Delete Empty Values

🚧

This feature is only available in BindPlane OP Enterprise. Learn more here.

Delete Empty Values Processor

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

MetricsLogsTraces
βœ“βœ“βœ“

Configuration Table

ParameterTypeDefaultDescription
telemetry_typesenums["Metrics", "Logs", "Traces"]The list of telemetry types the processor will act on.
deleted_valuesenums["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_keysstrings[]List of resource keys to exclude from deletion.
exclude_attribute_keysstrings[]List of attribute keys to exclude from deletion.
exclude_body_keysstring[]List of body keys to exclude from deletion.
empty_string_valuesstrings[]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

Standalone Processor

apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: remove-empty-attributes
  name: remove-empty-attributes
spec:
  type: remove_empty_values
  parameters:
    - name: empty_string_values
      value:
        - "-"

Configuration with Embedded Processor

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: enable_metrics
              value: false
            - 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: enable_logs
              value: true
            - 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:
                    - Metrics
                    - Logs
                    - 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