This commit is contained in:
parent
2796994608
commit
f860373c70
@ -1,16 +1,38 @@
|
||||
"""
|
||||
WSGI config for butler_ddochi 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/4.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
# ✅ Django 설정을 미리 불러온다
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'butler_ddochi.settings')
|
||||
|
||||
from django.conf import settings # <<<< 이거 추가
|
||||
|
||||
# ✅ DEBUG 모드 아닐 때만 OpenTelemetry 초기화
|
||||
if not settings.DEBUG:
|
||||
from opentelemetry import trace
|
||||
from opentelemetry.sdk.resources import Resource
|
||||
from opentelemetry.sdk.trace import TracerProvider
|
||||
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
||||
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
|
||||
from opentelemetry.instrumentation.django import DjangoInstrumentor
|
||||
|
||||
trace.set_tracer_provider(
|
||||
TracerProvider(
|
||||
resource=Resource.create({
|
||||
"service.name": "butler_ddochi",
|
||||
})
|
||||
)
|
||||
)
|
||||
|
||||
otlp_exporter = OTLPSpanExporter(
|
||||
endpoint="http://jaeger-collector:4317",
|
||||
insecure=True,
|
||||
)
|
||||
|
||||
trace.get_tracer_provider().add_span_processor(
|
||||
BatchSpanProcessor(otlp_exporter)
|
||||
)
|
||||
|
||||
DjangoInstrumentor().instrument()
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'butler_ddochi.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
16
butler_ddochi/wsgi.py.backup
Normal file
16
butler_ddochi/wsgi.py.backup
Normal file
@ -0,0 +1,16 @@
|
||||
"""
|
||||
WSGI config for butler_ddochi 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/4.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'butler_ddochi.settings')
|
||||
|
||||
application = get_wsgi_application()
|
@ -9,6 +9,7 @@ certifi==2024.7.4
|
||||
cffi==1.16.0
|
||||
charset-normalizer==3.3.2
|
||||
cryptography==43.0.0
|
||||
Deprecated==1.2.18
|
||||
dj-rest-auth==6.0.0
|
||||
Django==4.2.14
|
||||
django-allauth==0.63.6
|
||||
@ -18,6 +19,8 @@ django-taggit==6.0.0
|
||||
djangorestframework==3.15.2
|
||||
durationpy==0.9
|
||||
google-auth==2.35.0
|
||||
googleapis-common-protos==1.69.2
|
||||
grpcio==1.71.0
|
||||
gunicorn==22.0.0
|
||||
idna==3.7
|
||||
importlib_metadata==8.4.0
|
||||
@ -31,8 +34,21 @@ mdurl==0.1.2
|
||||
minio==7.2.7
|
||||
mysqlclient==2.2.4
|
||||
oauthlib==3.2.2
|
||||
opentelemetry-api==1.32.0
|
||||
opentelemetry-exporter-otlp==1.32.0
|
||||
opentelemetry-exporter-otlp-proto-common==1.32.0
|
||||
opentelemetry-exporter-otlp-proto-grpc==1.32.0
|
||||
opentelemetry-exporter-otlp-proto-http==1.32.0
|
||||
opentelemetry-instrumentation==0.53b0
|
||||
opentelemetry-instrumentation-django==0.53b0
|
||||
opentelemetry-instrumentation-wsgi==0.53b0
|
||||
opentelemetry-proto==1.32.0
|
||||
opentelemetry-sdk==1.32.0
|
||||
opentelemetry-semantic-conventions==0.53b0
|
||||
opentelemetry-util-http==0.53b0
|
||||
packaging==24.1
|
||||
pillow==10.4.0
|
||||
protobuf==5.29.4
|
||||
pyasn1==0.6.1
|
||||
pyasn1_modules==0.4.1
|
||||
pycparser==2.22
|
||||
@ -52,4 +68,5 @@ tzlocal==5.2
|
||||
urllib3==2.2.2
|
||||
websocket-client==1.8.0
|
||||
whitenoise==6.7.0
|
||||
wrapt==1.17.2
|
||||
zipp==3.20.0
|
||||
|
Loading…
Reference in New Issue
Block a user