SpanExporter
in package
implements
SpanExporterInterface
uses
LogsToLoggerTrait
FinalYes
Table of Contents
Interfaces
Properties
- $logger : LoggerInterface
- $serializer : ProtobufSerializer
- $transport : TransportInterface
Methods
- __construct() : mixed
- export() : FutureInterface
- forceFlush() : bool
- shutdown() : bool
- logDebug() : void
- logError() : void
- logger() : LoggerInterface
- logInfo() : void
- logNotice() : void
- logWarning() : void
- doLog() : void
- Logging is best effort: a failing logger must not break the code that is being observed.
Properties
$logger read-only
private
LoggerInterface
$logger
= new ConfiguredLogger()
$serializer
private
ProtobufSerializer
$serializer
$transport
private
TransportInterface
$transport
Methods
__construct()
public
__construct(TransportInterface<string|int, ContentTypes::*> $transport[, LoggerInterface $logger = new ConfiguredLogger() ]) : mixed
Parameters
- $transport : TransportInterface<string|int, ContentTypes::*>
- $logger : LoggerInterface = new ConfiguredLogger()
export()
public
export(iterable<string|int, mixed> $batch[, CancellationInterface|null $cancellation = null ]) : FutureInterface
Parameters
- $batch : iterable<string|int, mixed>
-
Batch of spans to export
- $cancellation : CancellationInterface|null = null
Attributes
- #[Override]
Return values
FutureInterfaceforceFlush()
public
forceFlush([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Attributes
- #[Override]
Return values
boolshutdown()
public
shutdown([CancellationInterface|null $cancellation = null ]) : bool
Parameters
- $cancellation : CancellationInterface|null = null
Attributes
- #[Override]
Return values
boollogDebug()
protected
logDebug(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logError()
protected
logError(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logger()
protected
logger() : LoggerInterface
Attributes
- #[Override]
Return values
LoggerInterfacelogInfo()
protected
logInfo(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logNotice()
protected
logNotice(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logWarning()
protected
logWarning(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
doLog()
Logging is best effort: a failing logger must not break the code that is being observed.
private
doLog(string $level, string $message, array<string|int, mixed> $context) : void
Parameters
- $level : string
- $message : string
- $context : array<string|int, mixed>