Delete Empty Values

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

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

observIQ docs - Delete Empty Values - image 1

Standalone Processor

yaml
1apiVersion: bindplane.observiq.com/v1
2kind: Processor
3metadata:
4  id: remove-empty-attributes
5  name: remove-empty-attributes
6spec:
7  type: remove_empty_values
8  parameters:
9    - name: empty_string_values
10      value:
11        - '-'

Configuration with Embedded Processor

yaml
1apiVersion: bindplane.observiq.com/v1
2kind: Configuration
3metadata:
4  id: remove-empty-attributes
5  name: remove-empty-attributes
6  labels:
7    platform: linux
8spec:
9  sources:
10    - type: nginx
11      parameters:
12        - name: enable_metrics
13          value: false
14        - name: endpoint
15          value: http://localhost:80/status
16        - name: disable_metrics
17          value: []
18        - name: enable_tls
19          value: false
20        - name: insecure_skip_verify
21          value: false
22        - name: ca_file
23          value: ''
24        - name: cert_file
25          value: ''
26        - name: key_file
27          value: ''
28        - name: collection_interval
29          value: 60
30        - name: enable_logs
31          value: true
32        - name: data_flow
33          value: high
34        - name: log_format
35          value: default
36        - name: access_log_paths
37          value:
38            - /var/log/nginx/access.log*
39        - name: error_log_paths
40          value:
41            - /var/log/nginx/error.log*
42        - name: start_at
43          value: end
44      processors:
45        - type: delete_empty_values
46          parameters:
47            - name: telemetry_types
48              value:
49                - Metrics
50                - Logs
51                - Traces
52            - name: deleted_values
53              value:
54                - Null Values
55            - name: exclude_resource_keys
56              value: []
57            - name: exclude_attribute_keys
58              value: []
59            - name: exclude_body_keys
60              value: []
61            - name: empty_string_values
62              value:
63                - '-'
64          disabled: false
65      disabled: false
66  selector:
67    matchLabels:
68      configuration: remove-empty-attributes