Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.89 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.89 KB

scout-apm-plugin

A symfony1 plugin to instrument web requests, CLI tasks, and Doctrine queries in a symfony1 application.

MIT License phpstan

More details on Scout APM can be found on their website, docs, and scout-apm-php readme.

Installation

  1. 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.

  1. Enable the plugin in project configuration:
class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    parent::setup();
    
    // Add the below line:
    $this->enablePlugins('scoutApmPlugin');
  }
}
  1. 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.

Built and used by

Way to Health (We're hiring!)