OpenTelemetry PHP

LogRecord
in package

Table of Contents

Constants

NANOS_PER_SECOND  = 1000000000

Properties

$attributes  : array<string|int, mixed>
$body  : mixed
$context  : ContextInterface|null
$observedTimestamp  : int|null
$severityNumber  : int
$severityText  : string|null
$timestamp  : int|null

Methods

__construct()  : mixed
setAttribute()  : self
setAttributes()  : self
setBody()  : self
setContext()  : self
setObservedTimestamp()  : self
setSeverityNumber()  : self
setSeverityText()  : self
setTimestamp()  : self

Constants

NANOS_PER_SECOND

public mixed NANOS_PER_SECOND = 1000000000

Properties

$attributes

protected array<string|int, mixed> $attributes = []

$observedTimestamp

protected int|null $observedTimestamp = null

$severityNumber

protected int $severityNumber = 0

$severityText

protected string|null $severityText = null

$timestamp

protected int|null $timestamp = null

Methods

__construct()

public __construct([mixed $body = null ]) : mixed
Parameters
$body : mixed = null

setAttribute()

public setAttribute(string $name, mixed $value) : self
Parameters
$name : string
$value : mixed
Return values
self

setBody()

public setBody([mixed $body = null ]) : self
Parameters
$body : mixed = null

The log record body

Return values
self

setObservedTimestamp()

public setObservedTimestamp([int|null $observedTimestamp = null ]) : self
Parameters
$observedTimestamp : int|null = null

Time, in nanoseconds since the unix epoch, when the event was observed by the collection system.

Return values
self

        
On this page

Search results