Flow PHP

TracerProvider

Read onlyYes
FinalYes

Methods

__construct()  : mixed
tracer()  : Tracer
Create a tracer for the given instrumentation scope.

Methods

__construct()

public __construct(SpanProcessor $processor, ClockInterface $clock, ContextStorage $contextStorage[, Sampler $sampler = new ParentBasedSampler(new AlwaysOnSampler()) ][, SpanLimits $limits = new SpanLimits() ][, ErrorHandler $errorHandler = new ErrorLogHandler() ]) : mixed
Parameters
$processor : SpanProcessor
$clock : ClockInterface
$contextStorage : ContextStorage
$sampler : Sampler = new ParentBasedSampler(new AlwaysOnSampler())
$limits : SpanLimits = new SpanLimits()
$errorHandler : ErrorHandler = new ErrorLogHandler()

tracer()

Create a tracer for the given instrumentation scope.

public tracer(Resource $resource, string $name[, string $version = 'unknown' ][, null|string $schemaUrl = null ][, null|Attributes $attributes = null ][, null|Attributes $signalAttributes = null ]) : Tracer

Note: Instance caching is handled by the Telemetry class. This method always creates a new Tracer instance.

Parameters
$resource : Resource

The resource context for all spans from this tracer

$name : string

The name of the instrumentation scope (e.g., library name)

$version : string = 'unknown'

The version of the instrumentation scope

$schemaUrl : null|string = null

Schema URL for semantic conventions

$attributes : null|Attributes = null

Additional scope attributes

$signalAttributes : null|Attributes = null

Default attributes merged into every started span (per-call values win)

Return values
Tracer
On this page

Search results