Skip to content

Commit

Permalink
importing newrelic config file if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
iambibhas committed Sep 4, 2020
1 parent bda3b9c commit c20543d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions baseframe/__init__.py
Expand Up @@ -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
Expand Down

0 comments on commit c20543d

Please sign in to comment.