Delete Fields

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

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

Metrics
Logs
Traces

Configuration Table

Parameter
Type
Default
Description

telemetry_types

telemetrySelector

["Logs", "Metrics", "Traces"]

The list of telemetry types the processor will act on.

condition

string

true

An OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all telemetry.

body_keys

string

[]

One or more body key names to remove from telemetry data. Note: Body fields are applicable only for logs.

attributes

string

[]

One or more attribute names to remove from telemetry data.

resource_attributes

string

[]

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

Bindplane docs - Delete Fields - image 1

Standalone Processor

apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: delete-fields-v2
  name: delete-fields-v2
spec:
  type: delete_fields-v2
  parameters:
    - type: delete_fields-v2
      parameters:
        - name: telemetry_types
          value: ['Logs']
        - name: condition
          value: 'true'
        - name: body_keys
          value:
            - spid
        - name: attributes
          value:
            - log.file.name
        - name: resource_attributes
          value:
            - host.id

Configuration with Embedded Processor

apiVersion: bindplane.observiq.com/v1
kind: Configuration
metadata:
  id: delete-fields-v2
  name: delete-fields-v2
  labels:
    platform: linux
spec:
  sources:
    - type: journald
      parameters:
        - name: units
          value: []
        - name: directory
          value: ''
        - name: priority
          value: info
        - name: start_at
          value: end
      processors:
        - type: delete_fields-v2
          parameters:
            - name: telemetry_types
              value: ['Logs']
            - name: condition
              value: 'true'
            - name: body_keys
              value:
                - spid
            - name: attributes
              value:
                - file.name
            - name: resource_attribute
              value:
                - host.id
  selector:
    matchLabels:
      configuration: delete-fields-v2

Last updated

Was this helpful?