Replaced `django-prometheus` with the default Django components, including model mixins, database backends, and cache configuration. This change simplifies monitoring setup by removing unnecessary dependencies, reducing overhead, and improving compatibility. **Details:** - Removed Prometheus metrics endpoints and middleware. - Updated database, cache, and model configurations to remove `django-prometheus`. - Adjusted WSGI settings to integrate OpenTelemetry instrumentation instead of Prometheus. - Updated dependency files and migration schemas accordingly.
19 lines
494 B
Python
19 lines
494 B
Python
"""
|
|
WSGI config for the Schon project.
|
|
|
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
|
|
For more information on this file, see
|
|
https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/
|
|
"""
|
|
|
|
import os
|
|
|
|
from django.core.wsgi import get_wsgi_application
|
|
from opentelemetry.instrumentation.django import DjangoInstrumentor
|
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schon.settings")
|
|
|
|
DjangoInstrumentor().instrument()
|
|
|
|
application = get_wsgi_application()
|