# Sentry — Ops Monitoring for NexusCRM

Standalone Go service that snapshots CRM data-volume and application-health
every 10 minutes, evaluates threshold rules, and alerts to Lark via Qwen-
translated natural language.

- Design: [`docs/design/sentry-ops-monitoring.md`](../docs/design/sentry-ops-monitoring.md)
- Plan:   [`docs/plans/2026-04-12-sentry-ops-monitoring.md`](../docs/plans/2026-04-12-sentry-ops-monitoring.md)

## Build

```
go build ./cmd/sentry
```

## Run (local)

Set the required environment variables (see the plan's §4.4 config table)
and:

```
./sentry
```

## Test

```
go test ./...
```

Integration tests against a live TiDB are guarded by the `integration`
build tag and require `SENTRY_TEST_DSN` to be set:

```
go test -tags=integration ./...
```
