function reportError()

in cloudprober/grpc_gpc_prober/stackdriver_util.php [47:62]


	function reportError($err){
		error_log($err);
		$projectId = '434076015357';
		$project_name = $this->err_client->projectName($projectId);

		$location = (new SourceLocation())
    		->setFunctionName($this->api);
		$context = (new ErrorContext())
    		->setReportLocation($location);

		$error_event = new ReportedErrorEvent();
		$error_event->setMessage('PHPProbeFailure: fails on '.$this->api.' API. Details: '.(string)$err."\n");
		$error_event->setContext($context);

		$this->err_client->reportErrorEvent($project_name, $error_event);
	}