Filter by Field

Filter by Field Processor

The Filter by Field processor can be used to include or exclude telemetry based on matched resource attributes, attributes, or log body fields.

Supported Types

MetricsLogsTraces

Configuration Table

ParameterTypeDefaultDescription
telemetry_typesenums["Metrics", "Logs", "Traces"]The list of telemetry types the processor will act on.
actionenumexcludeWhether to include (retain) or exclude (drop) matches.
match_typeenumstrictMethod for matching values. Strict matching requires that 'value' be an exact match. Regexp matching uses re2 to match a value.
attributesmap[]Attribute key value pairs to filter on. Telemetry is filtered if all attribute, resource, and body key pairs are matched.
resourcesmap[]Resource key value pairs to filter on. Telemetry is filtered if all attribute, resource, and body key pairs are matched.
bodiesmap[]Log body key value pairs to filter on. Log records filtered if all attribute, resource, and body key pairs are matched.

Example Configuration

Excluding matching log records

In this example, we exclude logs that have all of the following:

  • An environment attribute that equals dev
  • A host.name resource attribute that equals dev-server
  • A remote-ip log body field that equals 127.0.0.1

Web Interface

Standalone Processor

apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: filter_field
  name: filter_field
spec:
  type: filter_field
  parameters:
  - name: telemetry_types
    value:
    - Metrics
    - Logs
    - Traces
  - name: action
	  value: exclude
  - name: match_type
  	value: strict
  - name: attributes
  	value:
  		environment: dev
  - name: resources
  	value:
  		host.name: dev-server
  - name: bodies
  	value:
  		remote-ip: 127.0.0.1