for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace TechDeCo\ElasticApmAgent\Message;
use JsonSerializable;
use TechDeCo\ElasticApmAgent\Serialization;
use function array_merge;
final class Process implements JsonSerializable
{
/**
* @var int
*/
private $processId;
* @var int|null
private $parentProcessId;
* @var string|null
private $title;
* @var string[]
private $argumentList = [];
public function __construct(int $processId)
$this->processId = $processId;
}
public function withParentProcessId(int $id): self
$me = clone $this;
$me->parentProcessId = $id;
return $me;
public function titled(string $title): self
$me->title = $title;
public function withArguments(string ...$argument): self
$me->argumentList = array_merge($me->argumentList, $argument);
* @return mixed[]
public function jsonSerialize(): array
return Serialization::filterUnset([
'pid' => $this->processId,
'ppid' => $this->parentProcessId,
'title' => $this->title,
'argv' => $this->argumentList,
]);