Delete Fields


Note
This feature is available as an add-on for the Honeycomb Enterprise plan. Please contact your Honeycomb account team for details.

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 

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.
log_condition string true An OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all logs.
log_resource_attributes strings [] One or more resource attribute names to remove from logs.
log_attributes strings [] One or more attribute names to remove from logs.
log_body_keys strings [] One or more body key names to remove from log records.
datapoint_condition string true An OTTL condition that must evaluate to true to apply this processor to metrics. By default, the processor applies to all datapoints.
metric_resource_attributes strings [] One or more resource attribute names to remove from metrics.
metric_attributes strings [] One or more attribute names to remove from datapoints.
enable_traces bool true If true, this processor will operate on traces.
span_condition string true An OTTL condition that must evaluate to true to apply this processor. By default, the processor applies to all spans.
trace_resource_attributes strings [] One or more resource attribute names to remove from traces.
trace_attributes strings [] 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 

Honeycomb Docs - Delete Fields - image 1

Standalone Processor 

apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: delete-fields
  name: delete-fields
spec:
  type: delete_fields
  parameters:
    - type: delete_fields
      parameters:
        - name: telemetry_types
          value: ['Logs']
        - name: log_condition
          value: 'true'
        - name: log_resource_attributes
          value:
            - host.id
        - name: log_attributes
          value:
            - log.file.name
        - name: log_body_keys
          value:
            - spid
        - name: datapoint_condition
          value: 'true'
        - name: metric_resource_attributes
          value: []
        - name: metric_attributes
          value: []
        - name: span_condition
          value: 'true'
        - name: trace_resource_attributes
          value: []
        - name: trace_attributes
          value: []

Configuration with Embedded Processor 

apiVersion: bindplane.observiq.com/v1
kind: Configuration
metadata:
  id: delete-fields
  name: delete-fields
  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
          parameters:
            - name: telemetry_types
              value: ['Logs']
            - name: log_condition
              value: 'true'
            - name: log_resource_attribute
              value:
                - host.id
            - name: log_attributes
              value:
                - log.file.name
            - name: log_body_keys
              value:
                - spid
            - name: datapoint_condition
              value: 'true'
            - name: metric_resource_attributes
              value: []
            - name: metric_attributes
              value: []
            - name: span_condition
              value: 'true'
            - name: trace_resource_attributes
              value: []
            - name: trace_attributes
              value: []
  selector:
    matchLabels:
      configuration: delete-fields