Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
/ hyperf-tracer Public archive
forked from hyperf/tracer

This is a hyperf/tracer version suited for PicPay's Hyperf microservices needs.

License

Notifications You must be signed in to change notification settings

PicPay/hyperf-tracer

 
 

Repository files navigation

Hyperf Tracer

Drop-in replacement of hyperf/tracer suited for PicPay's microservices needs.

Getting started

Installation

  1. First override hyperf/tracer repository

    composer config repositories.tracer vcs https://github.com/PicPay/hyperf-tracer
  2. Then the usual Composer installation

    composer require hyperf/tracer
  3. And Hyperf's vendor publishing

    php bin/hyperf.php vendor:publish hyperf/tracer

Enabling features

  • HTTP Middleware (config/autoload/middlewares.php)
    return [
      'http' => [
          Hyperf\Tracer\Middleware\TraceMiddleware::class
      ],
    ];

Caveats

Testing

"Disable" tracing when testing. At test/bootstrap.php add:

putenv('TRACER_DRIVER=noop');

Anywhere before $container = require BASE_PATH . '/config/container.php';

Contributing

Development environment

docker-compose run --rm devenv

Inside the container

composer install

Footnotes

Packages

No packages published

Languages

  • PHP 99.8%
  • Dockerfile 0.2%