Complimentary Gartner® Report! 'A CTO's Guide to Open-Source Software: Answering the Top 10 FAQs.'Read more

Delete Fields

Description

The Delete Fields processor can be used to remove attributes, resource attributes, and 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
telemetry_typestelemetrySelector["Logs", "Metrics", "Traces"]The list of telemetry types the processor will act on.
conditionstringtrueAn OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all telemetry.
body_keysstring[]One or more body key names to remove from telemetry data. Note: Body fields are applicable only for logs.
attributesstring[]One or more attribute names to remove from telemetry data.
resource_attributesstring[]One or more resource attribute names to remove from telemetry data.

Example Configuration

This example configuration removes the "spid" body field, the "log.file.name" attribute, and the "host.id" resource attribute 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-v2
5  name: delete-fields-v2
6spec:
7  type: delete_fields-v2
8  parameters:
9    - type: delete_fields-v2
10      parameters:
11        - name: telemetry_types
12          value: ['Logs']
13        - name: condition
14          value: 'true'
15        - name: body_keys
16          value:
17            - spid
18        - name: attributes
19          value:
20            - log.file.name
21        - name: resource_attributes
22          value:
23            - host.id

Configuration with Embedded Processor

yaml
1apiVersion: bindplane.observiq.com/v1
2kind: Configuration
3metadata:
4  id: delete-fields-v2
5  name: delete-fields-v2
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-v2
22          parameters:
23            - name: telemetry_types
24              value: ['Logs']
25            - name: condition
26              value: 'true'
27            - name: body_keys
28              value:
29                - spid
30            - name: attributes
31              value:
32                - file.name
33            - name: resource_attribute
34              value:
35                - host.id
36  selector:
37    matchLabels:
38      configuration: delete-fields-v2