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-09-14 20:35:40 UTC


README

此库支持将APM Agent的跟踪报告发送到Redis

安装

  1. 通过composer安装

    composer require pccomponentes/apm-redis-reporter

使用方法

原生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 */

许可协议

遵循MIT许可协议

更多信息请参阅LICENSE