Delete Fields

Description

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

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.

Supported Types

MetricsLogsTraces

Configuration Table

ParameterTypeDefaultDescription
enable_logsbooltrueIf true, this processor will operate on logs.
log_conditionstringtrueAn OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all logs.
log_resource_attributesstrings[]One or more resource attribute names to remove from logs.
log_attributesstrings[]One or more attribute names to remove from logs.
log_body_keysstrings[]One or more body key names to remove from log records.
enable_metricsbooltrueIf true, this processor will operate on metrics.
datapoint_conditionstringtrueAn OTTL condition that must evaluate to true to apply this processor to metrics. By default, the processor applies to all datapoints.
metric_resource_attributesstrings[]One or more resource attribute names to remove from metrics.
metric_attributesstrings[]One or more attribute names to remove from datapoints.
enable_tracesbooltrueIf true, this processor will operate on traces.
span_conditionstringtrueAn OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all spans.
trace_resource_attributesstrings[]One or more resource attribute names to remove from traces.
trace_attributesstrings[]One or more attribute names to remove from spans.

Example Configuration

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

Web Interface

observIQ docs - Delete Fields - image 1

Standalone Processor

yaml
1apiVersion: bindplane.observiq.com/v1
2kind: Processor
3metadata:
4  id: delete-fields
5  name: delete-fields
6spec:
7  type: delete_fields
8  parameters:
9    - type: delete_fields
10      parameters:
11        - name: enable_logs
12          value: true
13        - name: log_condition
14          value: 'true'
15        - name: log_resource_attributes
16          value:
17            - host.id
18        - name: log_attributes
19          value:
20            - log.file.name
21        - name: log_body_keys
22          value:
23            - spid
24        - name: enable_metrics
25          value: false
26        - name: datapoint_condition
27          value: 'true'
28        - name: metric_resource_attributes
29          value: []
30        - name: metric_attributes
31          value: []
32        - name: enable_traces
33          value: false
34        - name: span_condition
35          value: 'true'
36        - name: trace_resource_attributes
37          value: []
38        - name: trace_attributes
39          value: []

Configuration with Embedded Processor

yaml
1apiVersion: bindplane.observiq.com/v1
2kind: Configuration
3metadata:
4  id: delete-fields
5  name: delete-fields
6  labels:
7    platform: linux
8spec:
9  sources:
10    - type: journald
11      parameters:
12        - name: units
13          value: []
14        - name: directory
15          value: ''
16        - name: priority
17          value: info
18        - name: start_at
19          value: end
20      processors:
21        - type: delete_fields
22          parameters:
23            - name: enable_logs
24              value: true
25            - name: log_condition
26              value: 'true'
27            - name: log_resource_attribute
28              value:
29                - host.id
30            - name: log_attributes
31              value:
32                - log.file.name
33            - name: log_body_keys
34              value:
35                - spid
36            - name: enable_metrics
37              value: false
38            - name: datapoint_condition
39              value: 'true'
40            - name: metric_resource_attributes
41              value: []
42            - name: metric_attributes
43              value: []
44            - name: enable_traces
45              value: false
46            - name: span_condition
47              value: 'true'
48            - name: trace_resource_attributes
49              value: []
50            - name: trace_attributes
51              value: []
52  selector:
53    matchLabels:
54      configuration: delete-fields