A policy is an atomic rule that matches specific telemetry and applies an
action. Each policy does one thing: identify telemetry that meets certain
conditions, then decide what happens to it. You can think of a policy as a way
to select a group of telemetry and apply an action to it. The policy syntax is
based on the
OpenTelemetry Semantic Convention
and is being
evaluated for donation
to the OpenTelemetry project. For now, you can read
Tero’s Policy Specification to learn more.
The policy specification is still in development and subject to change.
id: drop-debug-logsname: Drop debug and trace logslog: match: - log_field: severity_text regex: "^(DEBUG|TRACE)$" keep: none
This policy matches logs with DEBUG or TRACE severity and drops them. Nothing
else.
Edge policies execute in parallel. Each policy evaluates independently against
the original telemetry. No policy depends on another policy’s output. This makes
policies:
Easy to add, remove, or modify without side effects
Matchers identify which telemetry a policy applies to. A policy can have
multiple matchers—all must match for the policy to apply (AND logic). When
creating a policy, it’s best to ensure the matchers are mutually exclusive to
avoid unintended matches.
Edge loads policies from its policy providers. Currently two policy providers
are supported:
File: Local JSON files with file watching for hot reload
HTTP/gRPC: Remote endpoints with polling for updates
(view the gRPC API)
Multiple sources can be configured. Policies from all sources merge together.
The policy ID acts as a unique key. If two providers emit a policy with the same
ID, the one from the higher-priority source (HTTP > file) wins. Same-priority
sources will have the later update win. This structure allows you to create a
set of default policies that can be overridden remotely.