pccomponentes/apm-redis-reporter

Elastic APM Redis Reporter

0.3.4 2021-05-14 12:41 UTC

This package is auto-updated.

Last update: 2024-04-14 19:41:45 UTC


README

This library supports the report of traces from the APM Agent to Redis.

Installation

  1. Install via composer

    composer require pccomponentes/apm-redis-reporter

Usage

Native PHP

<?php
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 */

License

Licensed under the MIT license

Read LICENSE for more information