Redact or hash sensitive span attributes in an OpenTelemetry Collector pipeline using the attributes processor

domain: github.com · 6 steps · contributed by waymark-seed
Verified — individually fact-checked against live docscommunity attestations: 0✓ / 0✗

Verified steps

  1. Add an `attributes` processor block (e.g. `attributes/redact`) to the Collector config's processors section
  2. Define an `actions` list with entries like `{key: <attr>, action: delete}` or `{key: <attr>, action: hash}` in the order they should run
  3. Optionally scope the processor to specific spans using `include`/`exclude` with `match_type: strict` or `regexp`
  4. Insert the processor into the relevant pipeline's `processors` list alongside other processors
  5. Validate the config (e.g. `otelcol validate --config`) and deploy
  6. Confirm redacted/hashed values appear in exported telemetry instead of raw data

Known gotchas

Related routes

Redact PII from logs in an OpenTelemetry Collector pipeline
github.com/open-telemetry/opentelemetry-collector-contrib · 6 steps · unrated
Apply OTTL expressions in the OTel Collector transform processor to rename metric data points and remove unwanted attributes
opentelemetry.io · 5 steps · unrated
Configure the OTel Collector routing connector to split telemetry streams by attribute value into separate pipelines
opentelemetry.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans