MultiSpanProcessor
in package
implements
SpanProcessorInterface
FinalYes
Class SpanMultiProcessor is a SpanProcessor that forwards all events to an array of SpanProcessors.
Table of Contents
Interfaces
Properties
- $processors : array<int, SpanProcessorInterface>
Methods
- __construct() : mixed
- addSpanProcessor() : void
- forceFlush() : bool
- Export all ended spans to the configured Exporter that have not yet been exported.
- getSpanProcessors() : array<int, SpanProcessorInterface>
- onEnd() : void
- onStart() : void
- shutdown() : bool
- Cleanup; after shutdown, calling onStart, onEnd, or forceFlush is invalid Returns `false` is the processor is already shutdown, otherwise `true`.
Properties
$processors
private
array<int, SpanProcessorInterface>
$processors
= []
Methods
__construct()
public
__construct(SpanProcessorInterface ...$spanProcessors) : mixed
Parameters
- $spanProcessors : SpanProcessorInterface
addSpanProcessor()
public
addSpanProcessor(SpanProcessorInterface $processor) : void
Parameters
- $processor : SpanProcessorInterface
forceFlush()
Export all ended spans to the configured Exporter that have not yet been exported.
public
forceFlush([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Tags
Return values
boolgetSpanProcessors()
public
getSpanProcessors() : array<int, SpanProcessorInterface>
Return values
array<int, SpanProcessorInterface>onEnd()
public
onEnd(ReadableSpanInterface $span) : void
Parameters
- $span : ReadableSpanInterface
Tags
onStart()
public
onStart(ReadWriteSpanInterface $span, ContextInterface $parentContext) : void
Parameters
- $span : ReadWriteSpanInterface
- $parentContext : ContextInterface
Tags
shutdown()
Cleanup; after shutdown, calling onStart, onEnd, or forceFlush is invalid Returns `false` is the processor is already shutdown, otherwise `true`.
public
shutdown([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null