{"id":44264681,"url":"https://github.com/usetero/tero-collector-distro","last_synced_at":"2026-03-06T02:58:52.934Z","repository":{"id":333913905,"uuid":"1139195585","full_name":"usetero/tero-collector-distro","owner":"usetero","description":"Tero-maintained distribution of the OpenTelemetry Collector with policy processor support.","archived":false,"fork":false,"pushed_at":"2026-03-04T21:55:48.000Z","size":134,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-05T03:38:52.892Z","etag":null,"topics":["collector","observability","opentelemetry","otel","telemetry"],"latest_commit_sha":null,"homepage":"","language":"Go","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":"2026-01-21T16:40:20.000Z","updated_at":"2026-03-04T21:53:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/usetero/tero-collector-distro","commit_stats":null,"previous_names":["usetero/tero-collector-distro"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/usetero/tero-collector-distro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Ftero-collector-distro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Ftero-collector-distro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Ftero-collector-distro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Ftero-collector-distro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usetero","download_url":"https://codeload.github.com/usetero/tero-collector-distro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usetero%2Ftero-collector-distro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30159994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["collector","observability","opentelemetry","otel","telemetry"],"created_at":"2026-02-10T18:10:12.024Z","updated_at":"2026-03-06T02:58:52.926Z","avatar_url":"https://github.com/usetero.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tero Collector\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/usetero/tero-collector-distro/actions/workflows/release.yaml\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/usetero/tero-collector-distro/release.yaml?label=build\" alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"License\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nA custom OpenTelemetry Collector distribution with the Policy Processor for\nfiltering, sampling, and routing telemetry data based on configurable policies.\n\n## Overview\n\nTero Collector is built on top of the\n[OpenTelemetry Collector](https://opentelemetry.io/docs/collector/) and includes\nthe Policy Processor, which enables real-time filtering and sampling of logs,\nmetrics, and traces using the [policy-go](https://github.com/usetero/policy-go)\nlibrary.\n\n## Policy Processor\n\nThe Policy Processor evaluates incoming telemetry against a set of policies and\napplies actions such as:\n\n- **Drop**: Remove telemetry that matches specified patterns\n- **Keep**: Retain telemetry that matches specified patterns\n- **Sample**: Probabilistically sample telemetry at a configurable rate\n\nPolicies are defined in JSON and can be loaded from local files or remote\nsources. The processor supports hot-reloading, allowing policy updates without\nrestarting the collector.\n\n### Configuration\n\n```yaml\nprocessors:\n  policy:\n    providers:\n      - type: file\n        id: local-policies\n        path: /etc/tero-collector/policies.json\n        poll_interval_secs: 30\n```\n\n### Example Policies\n\n```json\n{\n  \"policies\": [\n    {\n      \"id\": \"drop-debug-logs\",\n      \"name\": \"Drop debug level logs\",\n      \"log\": {\n        \"match\": [{ \"log_field\": \"severity_text\", \"regex\": \"DEBUG\" }],\n        \"keep\": \"none\"\n      }\n    },\n    {\n      \"id\": \"sample-high-volume-service\",\n      \"name\": \"Sample logs from high-volume service at 10%\",\n      \"log\": {\n        \"match\": [\n          { \"resource_attribute\": \"service.name\", \"regex\": \"^high-volume-.*$\" }\n        ],\n        \"keep\": { \"percentage\": 10.0 }\n      }\n    }\n  ]\n}\n```\n\n## Building\n\n### Prerequisites\n\n- Go 1.24+\n- Docker\n- [Task](https://taskfile.dev/) (optional, for build automation)\n\n### Build Commands\n\n```bash\n# Run tests\ntask test\n\n# Build Docker image\ntask build:collector\n\n# Lint code\ntask lint\n```\n\n### Docker Image\n\nThe collector is distributed as a multi-architecture Docker image supporting\n`linux/amd64` and `linux/arm64`.\n\n```bash\ndocker pull ghcr.io/usetero/tero-collector-distro:latest\n```\n\n## Running\n\n### Docker\n\n```bash\ndocker run --rm -p 4317:4317 -p 4318:4318 \\\n  -v /path/to/policies.json:/etc/tero-collector/policies.json:ro \\\n  -v /path/to/config.yaml:/etc/tero-collector/config.yaml:ro \\\n  ghcr.io/usetero/tero-collector-distro:latest\n```\n\n### Example Configuration\n\n```yaml\nreceivers:\n  otlp:\n    protocols:\n      grpc:\n        endpoint: 0.0.0.0:4317\n      http:\n        endpoint: 0.0.0.0:4318\n\nprocessors:\n  policy:\n    providers:\n      - type: file\n        id: local\n        path: /etc/tero-collector/policies.json\n\nexporters:\n  debug:\n    verbosity: detailed\n\nservice:\n  pipelines:\n    logs:\n      receivers: [otlp]\n      processors: [policy]\n      exporters: [debug]\n```\n\n### Kubernetes\n\nTo sample the policy processor in Kubernetes, you can install the example below\n(requires the\n[OpenTelemetry Operator](https://github.com/open-telemetry/opentelemetry-operator)\nto be installed already.)\n\n```bash\nkubectl apply -f examples/kubernetes/opentelemetry-collector.yaml\n```\n\nSee [`examples/kubernetes/`](examples/kubernetes/) for a complete example with\nthe `OpenTelemetryCollector` CRD and policies ConfigMap.\n\n\u003e **Local Development with OrbStack**: When running Kubernetes locally with\n\u003e [OrbStack](https://orbstack.dev/), you can access collector services directly\n\u003e from your Mac using `\u003cservice\u003e.\u003cnamespace\u003e.svc.cluster.local`:\n\u003e\n\u003e ```bash\n\u003e # gRPC endpoint\n\u003e export OTEL_EXPORTER_OTLP_ENDPOINT=http://tero-collector-collector.observability.svc.cluster.local:4317\n\u003e\n\u003e # HTTP endpoint\n\u003e curl http://tero-collector-collector.observability.svc.cluster.local:4318/v1/logs\n\u003e ```\n\n## Components\n\nThis distribution includes the following components:\n\n### Receivers\n\n- OTLP (gRPC and HTTP)\n\n### Processors\n\n- Policy Processor (custom)\n- Batch\n- Memory Limiter\n- Attributes\n- Filter\n- Resource\n\n### Exporters\n\n- Debug\n- OTLP (gRPC)\n- OTLP/HTTP\n\n### Extensions\n\n- Health Check v2\n- zPages\n- PProf\n- Basic Auth\n- Bearer Token Auth\n\n## Project Structure\n\n```\n├── collector/\n│   ├── manifest.yaml    # OCB manifest defining the distribution\n│   ├── config.yaml      # Default collector configuration\n│   └── Dockerfile       # Multi-stage build for the collector\n├── processor/\n│   └── policyprocessor/ # Policy processor implementation\n├── examples/\n│   ├── config.yaml      # Example collector configuration\n│   ├── policies.json    # Example policy definitions\n│   └── kubernetes/      # Kubernetes deployment examples\n└── Taskfile.yaml        # Build automation\n```\n\n## License\n\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusetero%2Ftero-collector-distro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusetero%2Ftero-collector-distro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusetero%2Ftero-collector-distro/lists"}