Copied!

A class that contains all the required information for logging.

  • internal
CloneableInstantiable
Properties
public ?array $headers = NULL
 

An array that contains the headers for the response or request

  • var null|array
public ?int $latency = NULL
 

The latency in milliseconds

  • var null|int
public ?string $method = NULL
 

Rest method type

  • var null|string
public float $milliseconds
 

The time in milliseconds at time on creation for calculating latency

  • var float
public ?string $payload = NULL
 

An array representation of JSON for the response or request

  • var null|string
public ?int $processId = NULL
 

The Process ID for tracing logs

  • var null|int $processId
public ?int $requestId = NULL
 

The Request id for tracing logs

  • var null|int $requestId ;
public ?int $retryAttempt = NULL
 

The retry attempt number

  • var null|int
public ?string $rpcName = NULL
 

The name of the gRPC method being called

  • var null|string
public ?string $serviceName = NULL
 

The Service Name of the gRPC

  • var null|string $serviceName
public string|int|?null $status = NULL
 

Status code for REST or gRPC methods

  • var null|int|string
public string $timestamp
 

Timestamp in format RFC3339 representing when this event ocurred

  • var string
public ?string $url = NULL
 

URL representing the rest URL endpoint

  • var null|string
Methods
public __construct(?float $startTime = NULL)
 

Creates an object with all the fields required for logging Passing a string representation of a timestamp calculates the difference between these two times and sets the latency field with the result.

  • param null|float $startTime (Optional) Parameter to calculate the latency
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration