Skip to content

SuoraGmbH/php-apm-wrapper

Repository files navigation

This is a wrapper for APMs in PHP

Latest Version on Packagist Tests Total Downloads

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages