diff --git a/README.md b/README.md index b926161..7cd851b 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ SilverLinux is the primary self-hosted platform for Silver Solutions and hosts s * Gitea Actions Runner * DbGate * Xray +* Sentry * Prometheus * Grafana * Node Exporter diff --git a/docs/AI_CONTEXT.md b/docs/AI_CONTEXT.md index dd65648..452a63d 100644 --- a/docs/AI_CONTEXT.md +++ b/docs/AI_CONTEXT.md @@ -29,6 +29,7 @@ Public IP: 51.255.83.140 * Gitea Actions Runner (`silverlinux-runner`) * DbGate * Xray +* Sentry (Error Tracking & Observability) * Prometheus * Grafana * Node Exporter @@ -49,6 +50,8 @@ nuget.silveressence.net -> BaGet (through Nginx Proxy Manager) dbgate.silveressence.net -> DbGate (through Nginx Proxy Manager) +sentry.silveressence.net -> Sentry (through Nginx Proxy Manager) + Xray -> Public tunneling endpoint through proxy network ## Secrets diff --git a/docs/roadmap.md b/docs/roadmap.md index 0b87dee..9a98dc1 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -97,9 +97,32 @@ Purpose: Status: ```text -Planned +Completed ``` +Completed components: + +* Sentry self-hosted distributed deployment (70+ services) +* Relay for event ingestion +* Kafka for event streaming +* ClickHouse for high-performance event storage +* PostgreSQL for metadata storage +* Snuba for event processing and query engine +* Redis for caching and coordination +* SeaweedFS for object/file storage +* Web UI and API layer +* Background workers (taskworker, cron, cleanup, etc.) +* Nginx proxy integration at sentry.silveressence.net + +Deployment: + +* Docker Compose project: sentry-self-hosted +* Management: slcompose orchestrator with Infisical secret injection +* External access: sentry.silveressence.net (Nginx Proxy Manager) +* Internal networking: Isolated sentry-self-hosted_default network + +See [docs/sentry.md](sentry.md) for complete deployment documentation. + --- ### Identity And Access diff --git a/docs/sentry.md b/docs/sentry.md new file mode 100644 index 0000000..004bc60 --- /dev/null +++ b/docs/sentry.md @@ -0,0 +1,176 @@ +# Sentry (Self-Hosted) + +## Overview + +Sentry is the centralized error tracking and observability platform used across the SilverLinux infrastructure. It is deployed as a full self-hosted distributed system composed of multiple interconnected services. + +This deployment is production-ready and runs as an isolated Docker Compose stack. + +--- + +## Service Status + +- Status: Running +- Compose Project: sentry-self-hosted +- Container Count: 70+ services + +--- + +## Public Access + +Sentry is exposed via Nginx Proxy Manager: + +- Domain: https://sentry.silveressence.net +- Internal proxy container: sentry-self-hosted-nginx-1 +- Port: 9000 → 80 (internal nginx proxy mapping) + +Only the Nginx entry container is exposed externally. All other services are internal-only. + +--- + +## Architecture Overview + +Sentry is a distributed event processing pipeline: + +``` +Client Applications + → Relay + → Kafka + → Snuba + → ClickHouse + → Web API (UI + Query Layer) +``` + +--- + +## Core Components + +### Web Interface +- Container: sentry-self-hosted-web-1 +- Purpose: UI + API layer + +### Relay +- Container: sentry-self-hosted-relay-1 +- Purpose: event ingestion gateway + +### Kafka +- Container: sentry-self-hosted-kafka-1 +- Purpose: event streaming backbone + +### Snuba +- Multiple consumer containers +- Purpose: event processing and query engine + +### ClickHouse +- Container: sentry-self-hosted-clickhouse-1 +- Purpose: high-performance event storage + +### PostgreSQL +- Container: sentry-self-hosted-postgres-1 +- Purpose: metadata storage + +### Redis +- Container: sentry-self-hosted-redis-1 +- Purpose: caching and coordination + +### Workers +Multiple background services: +- taskworker +- cron +- cleanup +- subscription consumers +- metrics processors +- ingestion pipelines + +### Storage +- SeaweedFS used for object/file storage + +--- + +## Networking + +- Docker network: sentry-self-hosted_default +- External exposure: ONLY nginx container via proxy network +- All processing services remain isolated internally + +--- + +## Data Flow + +1. Application sends events to Sentry SDK +2. Relay receives and validates events +3. Kafka buffers event streams +4. Snuba processes and transforms events +5. ClickHouse stores event data +6. Web service queries and displays results + +--- + +## Data Storage + +- PostgreSQL → metadata +- ClickHouse → event storage +- Kafka → event streaming buffer +- Redis → caching/coordination +- SeaweedFS → attachments and file objects + +--- + +## Backup Requirements + +The following must be backed up: +- PostgreSQL database volume +- ClickHouse data volume +- Sentry configuration files +- Any persistent Kafka data (if enabled) + +--- + +## Management with slcompose + +### Start Sentry +```bash +slcompose up sentry +``` + +### Stop Sentry +```bash +slcompose down sentry +``` + +### Restart Sentry +```bash +slcompose restart sentry +``` + +### View Live Logs +```bash +slcompose logs sentry +``` + +### View Recent Logs +```bash +slcompose logs-tail sentry 500 +``` + +### View Injected Environment Variables +```bash +slcompose env sentry +``` + +--- + +## Important Notes + +- This is a distributed system; services must not be split or partially deployed. +- Updates must preserve service group integrity. +- Only the web/nginx layer should be exposed publicly. +- All 70+ containers are managed as a single atomic unit via slcompose. + +--- + +## Related Documentation + +- [orchestration.md](orchestration.md) — Service orchestration with slcompose +- [AI_CONTEXT.md](AI_CONTEXT.md) — Infrastructure overview +- [services.md](services.md) — All services on SilverLinux diff --git a/docs/services.md b/docs/services.md index e7f0e79..1020266 100644 --- a/docs/services.md +++ b/docs/services.md @@ -461,6 +461,62 @@ Operational --- +### Sentry + +URL: + +```text +https://sentry.silveressence.net +``` + +Purpose: + +* Centralized error tracking and observability +* Application exception diagnostics +* Release health visibility +* Performance monitoring + +Architecture: + +* Distributed system with 70+ services +* Components: Relay, Kafka, Snuba, ClickHouse, PostgreSQL, Redis, SeaweedFS +* Self-hosted deployment + +Networks: + +* `proxy` for Nginx Proxy Manager access +* `sentry-self-hosted_default` for internal service communication + +Management: + +* Managed via slcompose orchestrator +* Automated Infisical secret injection +* Single atomic deployment unit + +Data Storage: + +* PostgreSQL for metadata +* ClickHouse for high-performance event storage +* Redis for caching and coordination +* SeaweedFS for attachments and objects + +Backup Requirements: + +* PostgreSQL database volume +* ClickHouse data volume +* Sentry configuration files +* Persistent Kafka data (if enabled) + +Status: + +```text +Running +``` + +See [docs/sentry.md](sentry.md) for complete deployment documentation. + +--- + ### Xray (Direct Production) Purpose: @@ -695,7 +751,6 @@ Phase 1: Phase 2: * CrowdSec -* Sentry * Restic * Fail2Ban upgrade * Cloudflare rate limiting and WAF