There was an error while loading. Please reload this page.
2 parents 912f772 + 1a400d4 commit 73fafa0Copy full SHA for 73fafa0
django_prometheus/apps.py
@@ -1,4 +1,5 @@
1
from django.apps import AppConfig
2
+from django.conf import settings
3
from django_prometheus.exports import SetupPrometheusExportsFromConfig
4
from django_prometheus.migrations import ExportMigrations
5
# unused import to force instantiating the metric objects at startup.
@@ -19,4 +20,5 @@ def ready(self):
19
20
are usually short-lived), but can be useful for debugging.
21
"""
22
SetupPrometheusExportsFromConfig()
- ExportMigrations()
23
+ if getattr(settings, 'PROMETHEUS_EXPORT_MIGRATIONS', True):
24
+ ExportMigrations()
0 commit comments