{"id":47826514,"url":"https://github.com/usetero/policy","last_synced_at":"2026-04-03T19:44:50.342Z","repository":{"id":332831547,"uuid":"1103488440","full_name":"usetero/policy","owner":"usetero","description":"Vendor-neutral specification for portable telemetry policy rules.","archived":false,"fork":false,"pushed_at":"2026-03-24T14:56:08.000Z","size":162,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-25T19:13:32.206Z","etag":null,"topics":["observability","policy","telemetry"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usetero.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-25T00:02:34.000Z","updated_at":"2026-03-04T21:53:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/usetero/policy","commit_stats":null,"previous_names":["usetero/policy"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/usetero/policy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Fpolicy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Fpolicy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Fpolicy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Fpolicy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usetero","download_url":"https://codeload.github.com/usetero/policy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Fpolicy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31374021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T17:53:18.093Z","status":"ssl_error","status_checked_at":"2026-04-03T17:53:17.617Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["observability","policy","telemetry"],"created_at":"2026-04-03T19:44:49.682Z","updated_at":"2026-04-03T19:44:50.318Z","avatar_url":"https://github.com/usetero.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Policies\n\nAtomic, portable rules for processing telemetry. From the creator of\n[Vector](https://vector.dev).\n\n## The problem\n\nEvery telemetry tool has the same configuration problem. Datadog Agent, OTel\nCollector, Vector, Fluent Bit—they all work the same way: you write a config\nthat defines processing rules, and data flows through sequentially.\n\nThis breaks down:\n\n- Configs grow into thousands of lines that nobody fully understands\n- You need to understand the whole config to safely change any part\n- Performance degrades as you add rules—a hundred regex patterns might work, a\n  thousand won't\n- AI can't help because the config is too interconnected\n\nWe saw this happen across thousands of Vector deployments. Configs that started\nclean became unmaintainable. Everyone hits the same wall.\n\n## A different model\n\n```yaml\nid: drop-checkout-debug-logs\nname: Drop checkout debug logs\nlog:\n  match:\n    - resource_attribute: [\"service.name\"]\n      exact: checkout-api\n    - log_field: LOG_FIELD_SEVERITY_TEXT\n      exact: DEBUG\n  keep: none\n```\n\nA policy does one thing. You read it and know exactly what it does. No context\nneeded.\n\nAttributes use path arrays to support nested access:\n\n```yaml\n# Flat attribute\nlog_attribute: [\"user_id\"]\n\n# Nested attribute (e.g., http.request.method)\nlog_attribute: [\"http\", \"request\", \"method\"]\n```\n\n## How it works\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                          Traditional                            │\n│                                                                 │\n│   Log ──▶ Component A ──▶ Component B ──▶ Component C ──▶ Out   │\n│               │                │               │                │\n│           bottleneck      bottleneck      bottleneck            │\n└─────────────────────────────────────────────────────────────────┘\n\n┌─────────────────────────────────────────────────────────────────┐\n│                           Policies                              │\n│                                                                 │\n│                        ┌─▶ Policy 1 ─┐                          │\n│                        ├─▶ Policy 2 ─┤                          │\n│        Log ──▶ Match ──┼─▶ Policy 3 ─┼──▶ Merge ──▶ Out         │\n│                        ├─▶ Policy 4 ─┤                          │\n│                        └─▶ Policy N ─┘                          │\n│                                                                 │\n│                      parallel execution                         │\n└─────────────────────────────────────────────────────────────────┘\n```\n\nTelemetry arrives. The runtime matches against all policies in parallel. No\nsequential bottleneck. Matching policies contribute to fixed stages—`keep`\nfirst, then `transform`. If any policy drops the telemetry, it's gone. Otherwise\ntransforms apply and it flows out.\n\nPolicies are independent by design. Ten thousand policies execute as fast as\nten.\n\n## What this unlocks\n\n**Scale.** Tens of thousands of policies without performance degradation. Drop\nexactly the log patterns you want, not broad categories.\n\n**AI generation.** Each policy is a bounded problem. No DAG to reason about. AI\ncan generate and manage policies at scale.\n\n**Portability.** Policies use OpenTelemetry's data model. Same policy works\nacross any runtime that implements the spec.\n\n**Simplicity.** Add a policy without understanding the others. Remove one\nwithout fear. Each one stands alone.\n\n## Get started\n\n- **[Edge](https://github.com/usetero/edge)** — A minimal, lightweight proxy\n  that enforces policies. Deploy it anywhere in your infrastructure—before your\n  tools, after them, as a sidecar. Takes minutes to set up.\n\n- **[policy-rs](https://github.com/usetero/policy-rs)** — Rust SDK for\n  implementing the policy spec in your own tools.\n\n- **[policy-zig](https://github.com/usetero/policy-zig)** — Zig SDK for\n  implementing the policy spec in your own tools.\n\n- **[policy-go](https://github.com/usetero/policy-go)** — Go SDK for\n  implementing the policy spec in your own tools.\n\n- **[otel policyprocessor](https://github.com/usetero/tero-collector-distro/tree/master/processor/policyprocessor)**\n  — OpenTelemetry Collector Policy processor for running policies natively in\n  the collector.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusetero%2Fpolicy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusetero%2Fpolicy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusetero%2Fpolicy/lists"}