public function send() : bool
    {
        // Is the Agent enabled ?
        if ($this->config->get('active') === false) {
            return true;
        }

        $connector = new Connector($this->config);
        $status = true;

        // Commit the Errors
        if ($this->errorsStore->isEmpty() === false) {
            $status = $status && $connector->sendErrors($this->errorsStore);
            if ($status === true) {
                $this->errorsStore->reset();
            }
        }

        // Commit the Transactions
        if ($this->transactionsStore->isEmpty() === false) {
            $status = $status && $connector->sendTransactions($this->transactionsStore);
            if ($status === true) {
                $this->transactionsStore->reset();
            }
        }

        return $status;
    }
public function send() : bool
    {
        // Is the Agent enabled ?
        if ($this->config->get('active') === false) {
            return true;
        }

        $connector = new Connector($this->config);
        $status = true;

        // Commit the Errors
        if ($this->errorsStore->isEmpty() === false) {
            $status = $status && $connector->sendErrors($this->errorsStore);
            if ($status === true) {
                $this->errorsStore->reset();
            }
        }

        // Commit the Transactions
        if ($this->transactionsStore->isEmpty() === false) {
            $status = $status && $connector->sendTransactions($this->transactionsStore);
            if ($status === true) {
                $this->transactionsStore->reset();
            }
        }

        return $status;
    }
public function send ( ) : bool { // Is the Agent enabled ? if ( $ this -> config -> get ( 'active' ) === false ) { return true ; } $ connector = new Connector ( $ this -> config ) ; $ status = true ; // Commit the Errors if ( $ this -> errorsStore -> isEmpty ( ) === false ) { $ status = $ status && $ connector -> sendErrors ( $ this -> errorsStore ) ; if ( $ status === true ) { $ this -> errorsStore -> reset ( ) ; } } // Commit the Transactions if ( $ this -> transactionsStore -> isEmpty ( ) === false ) { $ status = $ status && $ connector -> sendTransactions ( $ this -> transactionsStore ) ; if ( $ status === true ) { $ this -> transactionsStore -> reset ( ) ; } } return $ status ; }
Send Data to APM Service

@link https://github.com/philkra/elastic-apm-laravel/issues/22
@link https://github.com/philkra/elastic-apm-laravel/issues/26

@return bool
Send Data to APM Service