From 229610513a9fda45daa73dbd29606baca8e91d30 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Wed, 13 Nov 2024 21:04:16 +0530 Subject: [PATCH] fix: django instrumentation fixes --- apiserver/plane/settings/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/plane/settings/common.py b/apiserver/plane/settings/common.py index 1b878e6b8d..a7096ef2a9 100644 --- a/apiserver/plane/settings/common.py +++ b/apiserver/plane/settings/common.py @@ -35,8 +35,6 @@ SECRET_KEY = os.environ.get("SECRET_KEY", get_random_secret_key()) # SECURITY WARNING: don't run with debug turned on in production! DEBUG = int(os.environ.get("DEBUG", "0")) -# Initialize Django instrumentation -DjangoInstrumentor().instrument() # Configure the tracer provider service_name = os.environ.get("SERVICE_NAME", "plane-ce-api") resource = Resource.create({"service.name": service_name}) @@ -46,6 +44,8 @@ otel_endpoint = os.environ.get("OTLP_ENDPOINT", "https://telemetry.plane.so") otlp_exporter = OTLPSpanExporter(endpoint=otel_endpoint) span_processor = BatchSpanProcessor(otlp_exporter) trace.get_tracer_provider().add_span_processor(span_processor) +# Initialize Django instrumentation +DjangoInstrumentor().instrument() # Allowed Hosts