Fix risk of uncaught exceptions due to gds metrics

Similar to https://github.com/alphagov/notifications-admin/pull/3510

Because of https://github.com/alphagov/gds_metrics_python/pull/8
This commit is contained in:
David McDonald
2020-07-08 16:51:41 +01:00
parent 4de75b8c56
commit 34538bcad8
3 changed files with 8 additions and 6 deletions

View File

@@ -83,6 +83,9 @@ def create_app(application):
application.config['NOTIFY_APP_NAME'] = application.name
init_app(application)
# Metrics intentionally high up to give the most accurate timing and reliability that the metric is recorded
metrics.init_app(application)
request_helper.init_app(application)
db.init_app(application)
migrate.init_app(application, db=db)
@@ -108,7 +111,6 @@ def create_app(application):
redis_store.init_app(application)
performance_platform_client.init_app(application)
document_download_client.init_app(application)
metrics.init_app(application)
register_blueprint(application)
register_v2_blueprints(application)