lar-trace爲服務之間調用提供鏈路追蹤

https://github.com/laravelclo...php

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包:laravel

$ composer require laravelcloud/lar-trace

config/app.php 中作以下配置git

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

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

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

添加變量至.envapi

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

...bash

鏈路追蹤系統

Contributing

Dependencies are managed through composer:app

$ composer install

Tests can then be run via phpunit:composer

$ vendor/bin/phpunit

Community

相關文章
相關標籤/搜索