waytohealth / scout-apm-plugin
symfony1 plugin for Scout APM
Installs: 5 190
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 5
Type:symfony1-plugin
Requires
- scoutapp/scout-apm-php: ^6.1
Requires (Dev)
- doctrine/coding-standard: ^9.0
- friendsofsymfony1/doctrine1: ^1.3
- friendsofsymfony1/symfony1: ^1.5
- phpstan/phpstan: ^1.0.1
This package is auto-updated.
Last update: 2024-12-13 05:53:53 UTC
README
A symfony1 plugin to instrument web requests, CLI tasks, and Doctrine queries in a symfony1 application.
More details on Scout APM can be found on their website, docs, and scout-apm-php readme.
Installation
- Install plugin via composer
composer require waytohealth/scout-apm-plugin
Note: This will install the plugin at plugins/scoutApmPlugin
(not in vendor/
as is typically the case with composer dependencies). You may need to adjust your gitignore accordingly.
- Enable the plugin in project configuration:
class ProjectConfiguration extends sfProjectConfiguration { public function setup() { parent::setup(); // Add the below line: $this->enablePlugins('scoutApmPlugin'); } }
- Set up environment variables, as documented in the Scout APM PHP docs.
SCOUT_KEY=xxxxxxx
SCOUT_MONITOR=true
SCOUT_NAME="Your application (production)"
SCOUT_REVISION_SHA=xxxxxxx
The exact mechanism will depend on your deployment environment. In our application, we use vlucas/phpdotenv to make variables in .env
files available to getenv()
. If your deployment environment doesn't natively support environment variables, either install a library such as vlucas/phpdotenv
or open a PR to this repo enabling configuration of ScoutAPM using \Scoutapm\Config::fromArray
.