PHP code example of middleware / laravel-apm
1. Go to this page and download the library: Download middleware/laravel-apm library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
middleware / laravel-apm example snippets
// In app/Http/Kernel.php
protected $middlewareGroups = [
'web' => [
// ... other middlewares
\Middleware\LaravelApm\Middleware\MetricsMiddleware::class,
\Middleware\LaravelApm\Middleware\TracingMiddleware::class,
],
];
// Or for specific routes in your routes file:
Route::middleware(['apm-metrics', 'apm-tracing'])->group(function () {
// Your routes here
}); -->
# Laravel APM
This guide will walk you through the process of installing and configuring our Laravel apm package in your project.
## Prerequisites
- Laravel project (version 8.x or higher recommended)
- Composer
- PHP 7.4 or higher
## Installation
To install the package, follow these steps:
1. Install the package using Composer: