# Metadata Enrichment for Lineage
# Stamp every event with pipeline and node provenance plus custom compliance tags using the metadata processor.
#
# Source: https://docs.expanso.io/examples/metadata-enrichment
#
# Usage:
#   curl -o config.yaml https://docs.expanso.io/examples/metadata-enrichment.yaml
#   expanso-edge run -f config.yaml

input:
  generate:
    mapping: |
      root = {
        "event_id": uuid_v4(),
        "level": "info",
        "message": "user signup"
      }
    interval: 5s

pipeline:
  processors:
    - metadata:
        include: [core, pipeline, node]
        custom:
          pipeline_owner: alice@example.com
          compliance_tier: pii
        target: body
        format: nested
        body_key: lineage

output:
  stdout:
    codec: lines
