Add Attribute

Add Log Record Attribute Processor

The Add Log Record Attribute processor can be used to enrich logs by adding attributes to all
log records in the pipeline.

Supported Types

MetricsLogsTraces

Configuration Table

ParameterTypeDefaultDescription
actionenumupsertinsert: Add attribute if it does not exist. update: Update existing value. upsert: Insert or update.
attributesmaprequiredOne or more key (attribute name) value (attribute value) pairs to add to all log records as attributes.

Example Configuration

Add the following key value pairs as attributes:

  • environment: dev
  • location: us-east1-b

Web Interface

add_attribute

Standalone Processor

apiVersion: bindplane.observiq.com/v1
kind: Processor
metadata:
  id: add-attributes
  name: add-attributes
spec:
  type: add_attribute
  parameters:
    - name: action
      value: upsert
    - name: attributes
      value:
        environment: dev
        location: us-east1-b

Configuration with Embedded Processor

apiVersion: bindplane.observiq.com/v1
kind: Configuration
metadata:
  id: add-attribute
  name: add-attribute
  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: add_attribute
          parameters:
            - name: action
              value: upsert
            - name: attributes
              value:
                environment: dev
                location: us-east1-b
  selector:
    matchLabels:
      configuration: add-attribute