manzadey / sentry-cron-monitor
Package for sentry cron monitors
Fund package maintenance!
Open Collective
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- phpunit/phpunit: 10
- roave/security-advisories: dev-latest
- symfony/var-dumper: ^6.2
- vlucas/phpdotenv: 5.5.x-dev
This package is auto-updated.
Last update: 2024-10-24 00:18:15 UTC
README
Installation
You can install the package via composer:
composer require manzadey/sentry-cron-monitor
Usage
use Manzadey\SentryCronMonitor\CronMonitor; $monitor = new CronMonitor('dsn'); $monitor->progress('monitorId'); // Get data from progress request $monitor->getDataProgress(); // our code... // if a failure is detected in the execution of the task $monitor->error(); // Get data from error request $monitor->getDataError(); // or if your task is completed successfully $monitor->ok(); // Get data from ok request $monitor->getDataOk(); // Get all data from requests $monitor->getData(); // get exception errors $monitor->getErrors(); // check exception errors $monitor->hasErrors();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.