src/plugins/plugin-redis.js
function createCreateStreamWrap(api) {
  return function createStreamWrap(create_stream) {
    return function create_stream_trace() {
      if (!this.stream) {
        Object.defineProperty(this, 'stream', {
          get: function () { return this._google_trace_stream; },
          set: function (val) {
            api.wrapEmitter(val);
            this._google_trace_stream = val;
          }
        });
      }
      return create_stream.apply(this, arguments);
    };
  };
}
function createCreateStreamWrap(api) {
  return function createStreamWrap(create_stream) {
    return function create_stream_trace() {
      if (!this.stream) {
        Object.defineProperty(this, 'stream', {
          get: function () { return this._google_trace_stream; },
          set: function (val) {
            api.wrapEmitter(val);
            this._google_trace_stream = val;
          }
        });
      }
      return create_stream.apply(this, arguments);
    };
  };
}
function createCreateStreamWrap ( api ) { return function createStreamWrap ( create_stream ) { return function create_stream_trace ( ) { if ( ! this . stream ) { Object . defineProperty ( this , 'stream' , { get : function ( ) { return this . _google_trace_stream ; } , set : function ( val ) { api . wrapEmitter ( val ) ; this . _google_trace_stream = val ; } } ) ; } return create_stream . apply ( this , arguments ) ; } ; } ; }
Used for redis version > 2.3
Used for redis version > 2 . 3