SdkAutoloader
in package
uses
LogsMessagesTrait
Tags
Table of Contents
Methods
- autoload() : bool
- logDebug() : void
- logError() : void
- logInfo() : void
- logNotice() : void
- logWarning() : void
- createLateBindingLoggerProvider() : LoggerProviderInterface
- createLateBindingMeterProvider() : MeterProviderInterface
- createLateBindingResponsePropagator() : ResponsePropagatorInterface
- createLateBindingTextMapPropagator() : TextMapPropagatorInterface
- createLateBindingTracerProvider() : TracerProviderInterface
- doLog() : void
- Logging is best effort: a failing log writer (for example an error handler that throws on `trigger_error`) must not break the code that is being observed.
- environmentBasedInitializer() : Configurator
- fileBasedInitializer() : Configurator
- loadConfigPropertiesFromEnv() : ConfigProperties
- loadDistributionPropertiesFromEnv() : DistributionProperties
- registerInstrumentations() : void
- Register all {@link Instrumentation} configured through SPI
- shouldLog() : bool
Methods
autoload()
public
static autoload() : bool
Return values
boollogDebug()
protected
static logDebug(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logError()
protected
static logError(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logInfo()
protected
static logInfo(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logNotice()
protected
static logNotice(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
logWarning()
protected
static logWarning(string $message[, array<string|int, mixed> $context = [] ]) : void
Parameters
- $message : string
- $context : array<string|int, mixed> = []
createLateBindingLoggerProvider()
private
static createLateBindingLoggerProvider() : LoggerProviderInterface
Return values
LoggerProviderInterfacecreateLateBindingMeterProvider()
private
static createLateBindingMeterProvider() : MeterProviderInterface
Return values
MeterProviderInterfacecreateLateBindingResponsePropagator()
private
static createLateBindingResponsePropagator() : ResponsePropagatorInterface
Return values
ResponsePropagatorInterfacecreateLateBindingTextMapPropagator()
private
static createLateBindingTextMapPropagator() : TextMapPropagatorInterface
Return values
TextMapPropagatorInterfacecreateLateBindingTracerProvider()
private
static createLateBindingTracerProvider() : TracerProviderInterface
Return values
TracerProviderInterfacedoLog()
Logging is best effort: a failing log writer (for example an error handler that throws on `trigger_error`) must not break the code that is being observed.
private
static doLog(string $level, string $message, array<string|int, mixed> $context) : void
Parameters
- $level : string
- $message : string
- $context : array<string|int, mixed>
environmentBasedInitializer()
private
static environmentBasedInitializer(Configurator $configurator) : Configurator
Parameters
- $configurator : Configurator
Tags
Return values
ConfiguratorfileBasedInitializer()
private
static fileBasedInitializer(Configurator $configurator, Configuration $config) : Configurator
Parameters
- $configurator : Configurator
- $config : Configuration
Tags
Return values
ConfiguratorloadConfigPropertiesFromEnv()
private
static loadConfigPropertiesFromEnv() : ConfigProperties
Return values
ConfigPropertiesloadDistributionPropertiesFromEnv()
private
static loadDistributionPropertiesFromEnv() : DistributionProperties
Return values
DistributionPropertiesregisterInstrumentations()
Register all {@link Instrumentation} configured through SPI
private
static registerInstrumentations(Configuration|null $config) : void
Instrumentation config is resolved here, during autoload, because hooks must be installed
before the instrumented function is first called, whereas building the SDK is deferred to a
Globals initializer. (With AutoRootSpan enabled the initializer runs before autoload
returns, so the deferral is conditional.) Both are served by the one document $config
already holds.
Parameters
- $config : Configuration|null
shouldLog()
private
static shouldLog(string $level) : bool
Parameters
- $level : string