badpixxel / paddock-sentry
Paddock - Sentry Extension
Package info
gitlab.com/paddock-project/paddock-sentry
Type:bundle
pkg:composer/badpixxel/paddock-sentry
Requires
- php: ^7.4|^8.0
- ext-curl: *
- ext-json: *
- badpixxel/paddock-core: ^4.0
Requires (Dev)
- badpixxel/php-sdk: ^2.0
README
Paddock extension for monitoring your Sentry projects: collect events statistics (received, rejected, filtered errors of the last hour) via the Sentry Web API, and raise alerts when a project gets too noisy.
Requirements
- PHP 8.1+ with
ext-curl&ext-json badpixxel/paddock-core^5.0 (Symfony 5.4 → 8.x)
| Version | PHP | Paddock Core | Status |
|---|---|---|---|
| 5.x | ^8.1 | ^5.0 | Active |
| 4.x | ^7.4 | 4.x | Maintenance |
Installation
composer require badpixxel/paddock-sentry
Configure the Sentry API access via environment:
# Sentry Web API Url, including your Auth Token
SENTRY_API_URL="https://<token>@sentry.io/api/0/organizations/<org>"
A sentry-health-checker track is registered automatically, and enabled as
soon as SENTRY_API_URL is defined.
Available Collectors
| Code | Collected Data |
|---|---|
sentry-stats | Project events counts of the last hour (by outcome) |
Usage Example
tracks:
my-sentry-checks:
collector: "sentry-stats"
description: "Check Sentry Projects Noise"
rules:
received: { lte: { warning: 100, error: 1000 } }
rejected: { lte: { error: 100 } }
Development & Tests
All checks run identically in CI and locally: the GitLab pipeline executes the exact same commands as the docker containers (one per Symfony version, 5.4 → 8.x):
# Start all containers & run everything (composer, quality, tests)
make verify
# Run PhpUnit tests in all containers
make test
# Quality suites (GrumPHP: lint, code style, PhpStan)
php vendor/bin/grumphp run --testsuite=travis
php vendor/bin/grumphp run --testsuite=csfixer
php vendor/bin/grumphp run --testsuite=phpstan
# PhpUnit testsuites
vendor/bin/phpunit --testsuite=integration
NB: live Sentry statistics require a real API access (SENTRY_API_URL):
without it, tests only cover services & tracks registration.
License
Paddock is released under the MIT License.