Skip to main content
This guide gets you from zero to filtering telemetry in under 5 minutes.

Prerequisites

  • A running observability platform (Datadog, or any OTLP-compatible backend)
  • Docker or a Zig build environment

Step 1: Create a Configuration

Create a config.json file:
config.json
{
  "listen_address": "127.0.0.1",
  "listen_port": 8080,
  "upstream_url": "https://agent-http-intake.logs.datadoghq.com",
  "metrics_url": "https://api.datadoghq.com",
  "log_level": "info",
  "policy_providers": [
    {
      "id": "local",
      "type": "file",
      "path": "policies.json"
    }
  ]
}
Replace the URLs with your Datadog region’s endpoints. See Datadog distribution for region-specific URLs.

Step 2: Create a Policy

Create a policies.json file with a simple policy that drops debug logs:
policies.json
{
  "policies": [
    {
      "id": "drop-debug-logs",
      "name": "Drop debug and trace logs",
      "log": {
        "match": [
          {
            "log_field": "severity_text",
            "regex": "^(DEBUG|TRACE)$"
          }
        ],
        "keep": "none"
      }
    }
  ]
}
This policy:
  • Matches logs with severity DEBUG or TRACE
  • Drops them (keep: none)

Step 3: Run Edge

docker run -d \
  -p 8080:8080 \
  -v $(pwd)/config.json:/etc/edge/config.json \
  -v $(pwd)/policies.json:/etc/edge/policies.json \
  ghcr.io/usetero/edge:latest \
  /etc/edge/config.json

Step 4: Point Your Telemetry at Edge

Configure your applications or agents to send telemetry to Edge instead of directly to your backend.
In your datadog.yaml:
logs_config:
    logs_dd_url: "localhost:8080"
    use_http: true

Step 5: Verify It’s Working

Send a test log and check that debug logs are being dropped:
# Send a debug log (should be dropped)
curl -X POST http://localhost:8080/api/v2/logs \
  -H "Content-Type: application/json" \
  -d '[{"message": "test debug message", "status": "debug"}]'

# Send an error log (should pass through)
curl -X POST http://localhost:8080/api/v2/logs \
  -H "Content-Type: application/json" \
  -d '[{"message": "test error message", "status": "error"}]'
Check Edge’s logs to see policy hits:
docker logs edge
# or
tail -f /var/log/edge.log

What’s Next?

You now have Edge filtering telemetry. From here: