https://github.com/bborbe/sentry-proxy
https://github.com/bborbe/sentry-proxy
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/bborbe/sentry-proxy
- Owner: bborbe
- License: bsd-2-clause
- Created: 2026-07-10T06:53:27.000Z (11 days ago)
- Default Branch: master
- Last Pushed: 2026-07-17T10:35:12.000Z (4 days ago)
- Last Synced: 2026-07-20T08:32:13.416Z (1 day ago)
- Language: Go
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sentry-proxy
A small rate-limiting reverse proxy for the [Sentry](https://sentry.io) ingest API. It forwards
`/api/...` event traffic to the upstream derived from the configured `SENTRY_DSN`, applying a
request limit over a sliding window so a noisy client cannot exhaust the Sentry quota. Exposes a
tiny HTTP admin surface for health checks, metrics, and runtime log-level changes.
## Run locally
```bash
make test
make run
```
## Build & publish image
```bash
make buca # builds + pushes docker.io/bborbe/sentry-proxy:
```
## Configuration
| Env | Flag | Required | Purpose |
|-----|------|----------|---------|
| `SENTRY_DSN` | `-sentry-dsn` | yes | Sentry DSN; its host is the upstream ingest target |
| `SENTRY_PROXY` | `-sentry-proxy` | no | Outbound proxy for the proxy's own Sentry client |
| `LISTEN` | `-listen` | yes | Address to listen on (e.g. `:9090`) |
| `REQUEST_LIMIT` | `-request-limit` | yes | Max forwarded requests per window |
| `REQUEST_DURATION` | `-request-duration` | yes | Sliding-window duration |
## HTTP endpoints
Served on the configured listen address (`-listen`):
```
GET /healthz # liveness — returns OK
GET /readiness # readiness — returns OK
GET /metrics # Prometheus metrics
GET /setloglevel/{n} # set glog verbosity to n
* /api/... # rate-limited proxy to the Sentry ingest upstream
```
## License
BSD-2-Clause — see [LICENSE](LICENSE).