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

Latest commit

 

History

History
60 lines (46 loc) · 1.45 KB

README.md

File metadata and controls

60 lines (46 loc) · 1.45 KB

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