waytohealth/scout-apm-plugin

symfony1 plugin for Scout APM

Installs: 854

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 1

Type:symfony1-plugin

dev-main 2021-11-19 01:46 UTC

This package is auto-updated.

Last update: 2021-11-19 01:46:49 UTC


README

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!)