lib/events.js
function (payload, callback) {
    if (!this.enableEventLogging) {
      if (callback) return callback();
      return;
    }
    var options = this.getRequestOptions(payload);
    this.request(options, function(err){
      if (err) return this.handleError(err, callback);
      if (callback) {
        return callback();
      }
    }.bind(this))
  }
function (payload, callback) {
    if (!this.enableEventLogging) {
      if (callback) return callback();
      return;
    }
    var options = this.getRequestOptions(payload);
    this.request(options, function(err){
      if (err) return this.handleError(err, callback);
      if (callback) {
        return callback();
      }
    }.bind(this))
  }
function ( payload , callback ) { if ( ! this . enableEventLogging ) { if ( callback ) return callback ( ) ; return ; } var options = this . getRequestOptions ( payload ) ; this . request ( options , function ( err ) { if ( err ) return this . handleError ( err , callback ) ; if ( callback ) { return callback ( ) ; } } . bind ( this ) ) }
Send an event to the events service

The event is skipped if the instance is not enabled to send logging events

@private
@param {Object} payload the http POST body of the event
@param {Function} [callback] a callback function to invoke when the send has completed
@returns {Promise}
Send an event to the events service