OpenTelemetry PHP

PsrTransportFactory
in package
implements TransportFactoryInterface uses LogsMessagesTrait

FinalYes

Table of Contents

Interfaces

TransportFactoryInterface

Properties

$client  : ClientInterface|null
$requestFactory  : RequestFactoryInterface|null
$streamFactory  : StreamFactoryInterface|null

Methods

__construct()  : mixed
create()  : TransportInterface
discover()  : self
logDebug()  : void
logError()  : void
logInfo()  : void
logNotice()  : void
logWarning()  : void
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.
findClient()  : ClientInterface
shouldLog()  : bool

Properties

Methods

__construct()

public __construct([ClientInterface|null $client = null ][, RequestFactoryInterface|null $requestFactory = null ][, StreamFactoryInterface|null $streamFactory = null ]) : mixed
Parameters
$client : ClientInterface|null = null
$requestFactory : RequestFactoryInterface|null = null
$streamFactory : StreamFactoryInterface|null = null

create()

public create(string $endpoint, string $contentType[, array<string|int, mixed> $headers = [] ][, mixed $compression = null ][, float $timeout = 10.0 ][, int $retryDelay = 100 ][, int $maxRetries = 3 ][, string|null $cacert = null ][, string|null $cert = null ][, string|null $key = null ]) : TransportInterface
Parameters
$endpoint : string
$contentType : string
$headers : array<string|int, mixed> = []
$compression : mixed = null
$timeout : float = 10.0
$retryDelay : int = 100
$maxRetries : int = 3
$cacert : string|null = null
$cert : string|null = null
$key : string|null = null
Tags
phan-suppress

PhanTypeMismatchArgumentNullable

Attributes
#[Override]
Return values
TransportInterface

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

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>

findClient()

private static findClient(float $timeout, string|null $cacert, string|null $cert, string|null $key) : ClientInterface
Parameters
$timeout : float
$cacert : string|null
$cert : string|null
$key : string|null
Return values
ClientInterface

shouldLog()

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

Search results