1. Go to this page and download the library: Download vinelab/tracing-laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Vinelab\Tracing\Contracts\Extractor;
use Vinelab\Tracing\Contracts\Injector;
use Vinelab\Tracing\Contracts\Span;
use Vinelab\Tracing\Contracts\SpanContext;
public function startSpan(string $name, SpanContext $spanContext = null, ?int $timestamp = null): Span;
public function getRootSpan(): ?Span;
public function getCurrentSpan(): ?Span;
public function getUUID(): ?string;
public function extract($carrier, string $format): ?SpanContext;
public function inject($carrier, string $format);
public function injectContext($carrier, string $format, SpanContext $spanContext);
public function registerExtractionFormat(string $format, Extractor $extractor): array;
public function registerInjectionFormat(string $format, Injector $injector): array;
public function flush(): void;
use Vinelab\Tracing\TracingDriverManager;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
resolve(TracingDriverManager::class)->extend('jaeger', function () {
return new JaegerTracer;
});
}
use Vinelab\Tracing\Contracts\Tracer;
app(Tracer::class)->startSpan('Create Order')
class TracingServiceProvider extends ServiceProvider
{
use TracesLucidArchitecture;
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->traceLucidArchitecture();
}
}
sh
php artisan vendor:publish --provider="Vinelab\Tracing\TracingServiceProvider"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.