lar-trace为服务之间调用提供链路追踪

https://github.com/laravelclo…

Laravel Version Compatibility

  • Laravel 5.x.x is supported in the most recent version (composer require laravelcloud/lar-trace)

Installation

安装 Laravel 5.x

安装laravelcloud/lar-trace包:

$ composer require laravelcloud/lar-trace

config/app.php 中做如下配置

'providers' => array(
    /*
     * Package Service Providers...
     */
      LaravelCloud\Trace\TraceLaravel\TracingServiceProvider::class,
)

创建Trace的配置文件(config/trace.php)

$ php artisan vendor:publish --provider="LaravelCloud\Trace\TraceLaravel\TracingServiceProvider"

添加变量至.env

TRACE_ENABLED=1
TRACE_ENDPOINT_URL=http://127.0.0.1:9411/api/v2/spans
TRACE_RATE=1.0
TRACE_SERVICE_NAME=lar-examples
TRACE_SQL_BINDINGS=false

Lumen 5.x

链路追踪系统

Contributing

Dependencies are managed through composer:

$ composer install

Tests can then be run via phpunit:

$ vendor/bin/phpunit

Community

    原文作者:蒋建勇
    原文地址: https://segmentfault.com/a/1190000017904941
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞