Sequential icon
Script icon
Docker icon
Compose icon
Assert icon
If icon
SlackIncomingWebhook icon
Schedule icon

Verify OpenTelemetry Redaction Without Losing Useful Traces

Test OpenTelemetry redaction on actual exported traces, detect leaks and lost safe attributes, and retain evidence before failing the execution.

Categories
Infrastructure

Verify candidate redaction options through an isolated OpenTelemetry Collector Contrib. Tests cover trace span attributes, not all PII locations, logs, metrics or regulatory compliance.

How it works

  1. Validate policy options and generate an execution-specific Docker Compose stack.
  2. Start the real Collector and a local OTLP/HTTP capture service with no host ports.
  3. Send three synthetic trace cases and inspect the Collector's JSON exports for sensitive values, forbidden keys and missing safe fields or spans.
  4. Persist reports before asserting the verdict; finally remove this execution's containers, network and volume.

What you get

Download JSON at outputs.verify_export.outputFiles['report.json'] and Markdown at outputs.verify_export.outputFiles['report.md']. Reports include policy SHA256, pinned Collector image, span counts and failure reasons. Zero spans cannot pass.

Who it's for

Platform and observability engineers reviewing redaction-policy changes.

Why orchestrate this with Kestra

Service startup, inline Python submission/verification, report outputs and enforcement remain visible tasks, with bounded waits, transient retries and failure cleanup.

Prerequisites

Docker daemon access from a Kestra worker, Docker/Python plugins, and Docker-runner volume mounts enabled for /var/run/docker.sock. Images are digest-pinned. No production telemetry is used. Abrupt worker loss may require manual project-scoped cleanup.

Secrets

SLACK_WEBHOOK: incoming webhook used only when notify_slack is true. No secret is needed for default runs.

Quick start

  1. Enable Docker-runner volume mounts in your worker configuration. Import this flow.
  2. Execute with scenario=POLICY, default policy_yaml, timeout_seconds=30 (5–120), and notify_slack=false. policy_yaml is a bounded YAML mapping of redaction options, with summary: silent.
  3. Inspect reports and cleanup, then run scenario=LEAK and DROP_SAFE: each changes the real policy and must fail. The latter preserves spans while removing required safe attributes.
  4. Replace policy_yaml with your candidate rules. Enable optional Slack and set kestra_url if desired. Enable the disabled 06:00 UTC daily trigger only after a passing run.

How to extend

Add synthetic cases and expected safe fields for your workload. Keep resource/event/log coverage explicit; this checks only span attributes. A missing report or Collector timeout is an infrastructure failure, never a passing policy. This flow does not deploy changes.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.