PHP code example of darlinkster / worker-monitor

1. Go to this page and download the library: Download darlinkster/worker-monitor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

darlinkster / worker-monitor example snippets


AMQPMessage $rabbitMessage


$config = new \WorkerMonitor\Model\Config();
$config->setApiUrl('api_url');
$config->setApiKey('api_key');
$config->setLogger($logger); // Monolog logger interface - optional

$monitor = new \WorkerMonitor\Monitor($config);

$message = $monitor->convertMessage($rabbitMessage);
$monitor->sendMessageToApi($message);