OpenTelemetry PHP

LoggerExporter
in package
implements SpanExporterInterface, LoggerAwareInterface uses SpanExporterTrait, UsesSpanConverterTrait, LoggerAwareTrait

Table of Contents

Interfaces

SpanExporterInterface
LoggerAwareInterface

Constants

GRANULARITY_AGGREGATE  = 1
GRANULARITY_SPAN  = 2

Properties

$converter  : SpanConverterInterface|null
$defaultLogLevel  : string
$granularity  : int
$running  : bool
$serviceName  : string

Methods

__construct()  : mixed
doExport()  : bool
export()  : FutureInterface<string|int, bool>
forceFlush()  : bool
getSpanConverter()  : SpanConverterInterface
setDefaultLogLevel()  : void
setGranularity()  : void
shutdown()  : bool
convertSpan()  : array<string|int, mixed>
getLogger()  : LoggerInterface
log()  : void
setSpanConverter()  : void
doLog()  : void
setServiceName()  : void

Constants

Properties

$defaultLogLevel

private string $defaultLogLevel = \Psr\Log\LogLevel::INFO

$granularity

private int $granularity = self::GRANULARITY_AGGREGATE

Methods

__construct()

public __construct(string $serviceName[, LoggerInterface|null $logger = null ][, string|null $defaultLogLevel = LogLevel::DEBUG ][, SpanConverterInterface|null $converter = null ][, int $granularity = 1 ]) : mixed
Parameters
$serviceName : string
$logger : LoggerInterface|null = null
$defaultLogLevel : string|null = LogLevel::DEBUG
$converter : SpanConverterInterface|null = null
$granularity : int = 1

doExport()

public doExport(iterable<string|int, mixed> $spans) : bool
Parameters
$spans : iterable<string|int, mixed>
Tags
inheritDoc
Return values
bool

setDefaultLogLevel()

public setDefaultLogLevel(string $logLevel) : void
Parameters
$logLevel : string

setGranularity()

public setGranularity(int $granularity) : void
Parameters
$granularity : int

getLogger()

protected getLogger() : LoggerInterface
Return values
LoggerInterface

log()

protected log(string $message[, array<string|int, mixed> $context = [] ][, string|null $level = null ]) : void
Parameters
$message : string
$context : array<string|int, mixed> = []
$level : string|null = null

doLog()

private doLog(iterable<string|int, mixed> $spans) : void
Parameters
$spans : iterable<string|int, mixed>

setServiceName()

private setServiceName(string $serviceName) : void
Parameters
$serviceName : string

        
On this page

Search results