Deployment-aware log filtering and context enrichment for self-hosted observability.
Auto-Context helps teams understand which deployment caused which errors by linking logs to deploys, filtering low-value noise, aggregating repeated failures, and forwarding high-signal events to downstream tools.
Built for teams who want a lightweight, self-hosted observability layer between their apps and external logging systems.
- MVP, actively evolving
- Core local flow works with Docker Compose
- ClickHouse and Kafka-related files are present, but they are optional and not part of the default quick start
- API key authentication for project-scoped ingest
- Deployment tracking via
POST /api/deployments - Log ingestion via
POST /api/logs - Deployment context enrichment during async processing
- Noise filtering for low-value logs and health checks
- Error aggregation for repeated failures
- Downstream forwarding to file, HTTP, and Sentry-style endpoints
- Dashboard for projects, deployments, API keys, and stats
- Laravel 12 / PHP 8.2+
- PostgreSQL
- Redis
- Nginx
- Blade + Tailwind + Vite
- Docker Compose
- Docker with Compose support
git clone https://github.com/charoyan88/autocontext.git
cd autocontext
./scripts/start_mvp.shThe app will be available at http://localhost:8080.
./start.sh- Dashboard:
http://localhost:8080/login - Email:
admin@auto-context.local - Password:
password - API base URL:
http://localhost:8080/api
The default docker-compose.yml brings up:
appqueue-workerschedulernginxvitepostgresredis
Nginx is published on host port 8080.
curl -X POST http://localhost:8080/api/logs \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"timestamp": "2026-01-17T12:00:00+00:00",
"level": "ERROR",
"message": "Database connection failed",
"context": {
"exception": "PDOException",
"file": "Database.php",
"line": 42
}
}'curl -X POST http://localhost:8080/api/logs \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
{"timestamp": "2026-01-17T12:00:00+00:00", "level": "INFO", "message": "Request started"},
{"timestamp": "2026-01-17T12:00:01+00:00", "level": "ERROR", "message": "Request failed"}
]
}'curl -X POST http://localhost:8080/api/deployments \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"version": "v1.2.0",
"environment": "production",
"region": "us-east-1",
"started_at": "2026-01-17T12:00:00+00:00"
}'Copy .env.example to .env if you are not using the startup scripts.
Important defaults:
APP_URL=http://localhost:8080
DB_HOST=postgres
DB_DATABASE=auto_context
DB_USERNAME=auto
DB_PASSWORD=secret
REDIS_HOST=redis
QUEUE_CONNECTION=redisOptional integrations:
CLICKHOUSE_ENABLED=falseby default- ClickHouse environment variables are included for experimentation but the default Compose flow does not require a ClickHouse container
- Kafka-related env vars and
docker/kafka-connect/are experimental and not part of the default local startup path yet - Downstream HTTP, Sentry, and file targets should be treated as trusted-admin integrations
Experimental Kafka Connect notes: see docs/experimental_kafka_connect.md.
Run the test suite inside the app container:
docker compose exec app php artisan testRun a specific test file:
docker compose exec app php artisan test tests/Feature/LogBatchProcessingTest.php- Queue processing runs in the
queue-workercontainer - Scheduled stat flushing runs in the
schedulercontainer - Frontend assets are handled by the
vitecontainer - Nginx is configured generically for local use and does not require a specific domain name
See CONTRIBUTING.md for the expected local workflow.
See SECURITY.md for the current trust model and disclosure guidance.
This project is licensed under the MIT License. See LICENSE.