connectSpans() {
    if (this._state !== connectionStates.disconnected) {
      return
    }

    this._setState(connectionStates.connecting)
    logger.trace('Connecting to gRPC endpoint.')

    try {
      this.stream = this._connectSpans()

      // May not actually be "connected" at this point but we can write to the stream
      // immediately.
      this._setState(connectionStates.connected, this.stream)
    } catch (err) {
      logger.warn(err, 'Unexpected error establishing gRPC stream, will not attempt reconnect.')
      this._disconnect()
    }
  }
Start the Connection

Public Entry point -- initiates a connection