Merge pull request #3434 from alphagov/prom-celery

disable prometheus writing to files from celery apps
This commit is contained in:
Leo Hemsted
2022-01-21 11:34:07 +00:00
committed by GitHub

View File

@@ -2,6 +2,11 @@
from flask import Flask from flask import Flask
# import prometheus before any other code. If gds_metrics is imported first it will write a prometheus file to disk
# that will never be read from (since we don't have prometheus celery stats). If prometheus is imported first,
# prometheus will simply store the metrics in memory
import prometheus_client # noqa
# notify_celery is referenced from manifest_delivery_base.yml, and cannot be removed # notify_celery is referenced from manifest_delivery_base.yml, and cannot be removed
from app import notify_celery, create_app # noqa from app import notify_celery, create_app # noqa