OpenTelemetry PHP

Environment
in package
implements ResourceDetectorInterface uses LogsMessagesTrait

FinalYes

A malformed value is discarded in full, not pair by pair.

Tags
see
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.61.0/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable

Table of Contents

Interfaces

ResourceDetectorInterface

Methods

getResource()  : ResourceInfo
logDebug()  : void
logError()  : void
logInfo()  : void
logNotice()  : void
logWarning()  : void
decode()  : array<string|int, mixed>
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.
shouldLog()  : bool

Methods

logDebug()

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> = []

decode()

private static decode(array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
$attributes : array<string|int, mixed>
Return values
array<string|int, mixed>

doLog()

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>

shouldLog()

private static shouldLog(string $level) : bool
Parameters
$level : string
Return values
bool
On this page

Search results