suora / apm-wrapper
This is a wrapper for APMs in PHP
Fund package maintenance!
SuoraGmbH
Installs: 2 996
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 3
Requires
- php: ^8.1
Requires (Dev)
- laravel/pint: ^1.2
- pestphp/pest: ^1.20
- tideways/ext-tideways-stubs: ^5.5
This package is auto-updated.
Last update: 2024-12-09 15:52:12 UTC
README
This is a wrapper for APMs in PHP
Most APMs in the PHP ecosystem automatically track requests and errors. However, if you implement background jobs, you might need to manually track them, especially if one PHP process runs multiple jobs. This project might help you. :)
This package is work in progress and might never be production ready.
Installation
You can install the package via composer:
composer require suora/apm-wrapper
Usage
$profiler = new \Suora\ApmWrapper\Profiler\AutoTideways( 'your-token', 'workerpool' ); foreach ($jobs as $job) { $profiler->startTransaction($job->getName()); $profiler->addParameter('jobId', $job->getId()); $job->run(); $profiler->endTransaction(); }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.