diff --git a/baseframe/__init__.py b/baseframe/__init__.py index 4661942b..7b5215c7 100644 --- a/baseframe/__init__.py +++ b/baseframe/__init__.py @@ -404,6 +404,15 @@ def init_app( ) app.config['RECAPTCHA_DATA_ATTRS'].setdefault('size', 'invisible') + try: + import newrelic.agent + import os.path + + if os.path.isfile('newrelic.ini'): + newrelic.agent.initialize('newrelic.ini') + except ImportError: + pass + def register(self, app, options, first_registration=False): """ Called by :meth:`Flask.register_blueprint` to register all views