Filter Resource Attribute

Resource Attribute Filter Processor

The Resource Attribute Filter processor can be used to include or exclude logs based on matched resources.

Supported Types

MetricsLogsTraces

Configuration Table

ParameterTypeDefaultDescription
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.
attributesmaprequiredOne or more key (resource name) value (resource value) pairs to filter on.

Example Configuration

Web Interface

filter_resource_attribute

Strict Exclude

Exclude metrics and logs that have the following resources:

  • environment: dev
  • location: us-east1-b
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: exclude-resources
  name: exclude-resources
spec:
  type: filter_resource_record_attribute
  parameters:
    - name: action
      value: exclude
    - name: match_type
      value: strict
    - name: attributes
      value:
        environment: dev
        location: us-east1-b

Strict Include

Include metrics and logs that have the following resources:

  • environment: dev
  • location: us-east1-b
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: include-resources
  name: include-resources
spec:
  type: filter_resource_record_attribute
  parameters:
    - name: action
      value: exclude
    - name: match_type
      value: strict
    - name: attributes
      value:
        environment: dev
        location: us-east1-b

Regexp Exclude

Exclude metrics and logs that have the following attribute with any value:

  • env: *
apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: exclude-resources
  name: exclude-resources
spec:
  type: filter_resource_record_attribute
  parameters:
    - name: action
      value: exclude
    - name: match_type
      value: regexp
    - name: attributes
      value:
        env: "*"