Drop-in replacement of hyperf/tracer
suited for PicPay's microservices needs.
-
First override
hyperf/tracer
repositorycomposer config repositories.tracer vcs https://github.com/PicPay/hyperf-tracer
-
Then the usual Composer installation
composer require hyperf/tracer
-
And Hyperf's vendor publishing
php bin/hyperf.php vendor:publish hyperf/tracer
- HTTP Middleware (
config/autoload/middlewares.php
)return [ 'http' => [ Hyperf\Tracer\Middleware\TraceMiddleware::class ], ];
"Disable" tracing when testing. At test/bootstrap.php
add:
putenv('TRACER_DRIVER=noop');
Anywhere before $container = require BASE_PATH . '/config/container.php';
docker-compose run --rm devenv
composer install
- https://docs.newrelic.com/attribute-dictionary/?event=Span
- https://docs.newrelic.com/docs/integrations/open-source-telemetry-integrations/opentelemetry/view-your-opentelemetry-data-new-relic/
- https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span
- https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md