def init_app(self, app, report_exceptions=False, reset_context_after_request=False):
        """
        Initialize honeybadger and listen for errors.
        :param Flask app: the Flask application object.
        :param bool report_exceptions: whether to automatically report exceptions raised by Flask on  requests
         (i.e. by calling abort) or not.
        :param bool reset_context_after_request: whether to reset honeybadger context after each request.
        """
        from flask import request_tearing_down, got_request_exception

        self.app = app

        self.app.logger.info('Initializing Honeybadger')

        self.report_exceptions = report_exceptions
        self.reset_context_after_request = reset_context_after_request
        self._initialize_honeybadger(app.config)

        # Add hooks
        if self.report_exceptions:
            self._register_signal_handler('auto-reporting exceptions',
                                          got_request_exception,
                                          self._handle_exception)

        if self.reset_context_after_request:
            self._register_signal_handler('auto clear context on request end',
                                          request_tearing_down,
                                          self._reset_context)

        logger.info('Honeybadger helper installed')