{"id":35734432,"url":"https://github.com/ai-shift/tracer","last_synced_at":"2026-03-17T05:03:16.212Z","repository":{"id":331651096,"uuid":"1128624022","full_name":"ai-shift/tracer","owner":"ai-shift","description":"Lightweight, self-hosted log aggregation and alerting for small to mid-sized projects.","archived":false,"fork":false,"pushed_at":"2026-01-10T15:41:21.000Z","size":290,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T04:33:16.387Z","etag":null,"topics":["logging","metrics","tracer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai-shift.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-05T23:16:52.000Z","updated_at":"2026-01-10T15:41:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ai-shift/tracer","commit_stats":null,"previous_names":["ai-shift/tracer"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/ai-shift/tracer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-shift%2Ftracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-shift%2Ftracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-shift%2Ftracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-shift%2Ftracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai-shift","download_url":"https://codeload.github.com/ai-shift/tracer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-shift%2Ftracer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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":["logging","metrics","tracer"],"created_at":"2026-01-06T12:14:05.104Z","updated_at":"2026-03-17T05:03:16.204Z","avatar_url":"https://github.com/ai-shift.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tracer\n\n\u003e Yes, exactly the one you thought about\n\nLightweight, self-hosted log aggregation and alerting for small to mid-sized projects.\n\n## What problem does it solve\n\n*OpenTelemetry* setup for small to mid projects is insanely expensive overkill.\n\n## How tracer helps\n\nSimplicity.\n\n- Run logs collector as a single binary\n- Self host logs and analytics panel\n- Get error alerts via Telegram\n- View logs grouped by trace ID\n\n### Philosophy\n\nIn production logs I care about two main things:\n\n1. Get error alert from infrastructure and not the client\n2. Get all the context about the error so tests and fixes could be written right away\n\nAlso I hate to setup infrastructure for each project to get these two simple things done.\n\nAny other logs may show some performance degradation or health status but in both cases do not require persistence. `tracer` uses single SQLite database to store all info about errors and only selected percent of other logs (chosen randomly)\n\n## Installation\n\n### Install\n\n**Full install (panel + collector):**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/ai-shift/tracer/main/install.sh | sudo bash\n```\n\n**Collector only (for remote servers):**\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/ai-shift/tracer/main/install.sh | sudo bash -s -- --collector-only\n```\n\nThis installs both components:\n- **tracer-collector** - runs as dedicated `tracer-collector` user\n- **tracer-panel** - runs as dedicated `tracer` user (unless `--collector-only`)\n\n### Configure collector\n\n`tracer-collector` supports guessing log format based on several heuristics and common patterns. More about [here](./docs/format-guessing.md).\n\n```bash\ntracer-collector add --src [journalctl] \u003cunit\u003e\n```\n\n### Start Services\n\n```bash\nsudo systemctl enable --now tracer-panel\nsudo systemctl enable --now tracer-collector\n```\n\nAccess the panel at http://localhost:8080\n\n## Features\n\n### Collector\n\n- **Multiple log formats**\n  - JSON with customizable field mappings\n  - User-defined regex patterns\n  - Journalctl (systemd services) with optional MESSAGE field parsing\n- **Automatic timestamp parsing** - RFC3339, ISO, Unix timestamps\n- **Field extraction** - timestamp, level, trace_id, message, context\n- **WebSocket transport** - low-latency streaming to panel with ping/pong keepalive\n- **Reconnection** - automatic reconnect with exponential backoff\n- **Named collectors** - identify collectors by name or auto-detect via outbound IP\n- **System stats collection** - CPU, RAM, disk usage sent to panel at configurable intervals\n- **Startup detection** - optional pattern matching to mark application restarts\n\n### Panel\n\n- **Authentication**\n  - Session-based auth with secure cookies\n  - Configurable session duration\n  - Admin and regular user roles\n  - Per-app access control for non-admin users\n  - Multiple collector API keys with per-key revocation and one-time plaintext display\n\n- **User management** (admin only)\n  - Create/delete users\n  - Assign admin privileges\n  - Per-user app access control\n\n- **Log management**\n  - Per-app SQLite databases (WAL mode)\n  - Configurable sample rate for non-error logs (errors always persisted at 100%)\n  - Automatic retention cleanup (configurable days)\n  - Trace ID grouping for request tracking\n  - Log detail view with raw message and context\n  - Filter logs by level\n\n- **Analytics dashboard**\n  - Error/warning/info counts (24h)\n  - Real-time collector status monitoring with system stats (CPU, RAM, disk)\n  - Per-app analytics views\n  - Configurable auto-refresh interval (default: 10s)\n\n- **Notifications**\n  - Telegram alerts for errors\n  - Per-user notifier configuration\n  - App-specific or global (admin) notifications\n  - Enable/disable notifiers without deleting\n  - Multiple notifiers per user\n\n## Architecture\n\n### Data isolation\n\n- Flat list of applications (no organization/project hierarchy)\n- Each application has its own SQLite database\n- SQLite databases use WAL mode for concurrent read/write performance\n\n### Data retention\n\n- Configurable retention period (default: 3 months)\n- Automatic daily cleanup of old logs\n- Errors always persisted, other logs sampled\n\n### Transport\n\n- Collector communicates with Panel via WebSocket\n- Collectors register their apps on connect\n- Keep-alive ping/pong for connection health\n\n## Development\n\n### Deployment\n\nSee `deploy/` directory for deployment scripts and systemd service files.\n\n```bash\ncd deploy\nmake deploy           # Deploy both panel and collector\nmake deploy-panel     # Deploy only panel\nmake deploy-collector # Deploy only collector\nmake restart          # Restart services\n```\n\n## Roadmap\n\n- [x] Multiple log formats (JSON, regex, journalctl)\n- [x] WebSocket transport with reconnection\n- [x] Per-app SQLite databases\n- [x] Authentication and user management\n- [x] Per-user app access control\n- [x] Telegram notifications\n- [x] Analytics dashboard\n- [x] Collector status monitoring with system stats\n- [x] Trace ID grouping\n- [x] Log retention cleanup\n- [x] API key authentication\n- [x] Journalctl MESSAGE field parsing\n- [x] Configurable refresh intervals\n- [x] Startup pattern detection\n- [ ] Log search with full-text\n- [x] Metrics collection (beyond logs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-shift%2Ftracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai-shift%2Ftracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-shift%2Ftracer/lists"}