PHP code example of pccomponentes / apm-redis-reporter
1. Go to this page and download the library: Download pccomponentes/apm-redis-reporter 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/ */
pccomponentes / apm-redis-reporter example snippets
declare(strict_types=1);
$redisClient = new Predis\Client('tcp://redis:6379?database=0');
$key = 'apm';
$reporter = new PcComponentes\ElasticAPM\Reporter\RedisReporter(
$redisClient,
$key
);
$apmTracer = new ZoiloMora\ElasticAPM\ElasticApmTracer(
// ZoiloMora\ElasticAPM\Configuration\CoreConfiguration::class
$reporter,
// ZoiloMora\ElasticAPM\Pool\PoolFactory::class
);
/** ... Use the connection in your project */