hussam-almarzoq / scout-apm-laravel

ScoutAPM PHP Agent for the Laravel Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scout Laravel APM Agent

Monitor the performance of PHP Laravel applications with Scout's PHP APM Agent. Detailed performance metrics and transaction traces are collected once the scout-apm package is installed and configured.

Requirements

  • PHP Version: PHP 7.0+
  • Laravel Version: 5.5+

Quick Start

A Scout account is required. Signup for Scout.

composer require scoutapp/scoutapm-laravel

Configuration

In your .env file, make sure you set a few configuration variables:

SCOUT_KEY=ABC0ZABCDEFGHIJKLMNOP
SCOUT_NAME="My Laravel App"
SCOUT_MONITOR=true

Your key can be found in the Scout Org settings page.

Documentation

For full installation and troubleshooting documentation, visit our help site.

Support

Please contact us at support@scoutapm.com or create an issue in this repo.

Custom Instrumentation

$request = new ServiceRequest();
$request->setApiVersion($version);

Turns into:

// At top, with other imports
use ScoutApm;

// Replacing the above code
$request = ScoutApm::instrument(
    "Custom", "Building Service Request",
    function ($span) use ($version) {
        $request = new ServiceRequest();
        $request->setApiVersion($version);
        return $request;
    }
);

About

ScoutAPM PHP Agent for the Laravel Framework

License:MIT License


Languages

Language:PHP 100.0%