Improve the frontend

This commit is contained in:
Urtzi Alfaro
2025-10-21 19:50:07 +02:00
parent 05da20357d
commit 8d30172483
105 changed files with 14699 additions and 4630 deletions

View File

@@ -110,7 +110,10 @@ class BaseFastAPIService:
self.metrics_collector = setup_metrics_early(self.app, self.service_name)
# Setup distributed tracing
if self.enable_tracing:
# Check both constructor flag and environment variable
tracing_enabled = self.enable_tracing and os.getenv("ENABLE_TRACING", "true").lower() == "true"
if tracing_enabled:
try:
jaeger_endpoint = os.getenv(
"JAEGER_COLLECTOR_ENDPOINT",
@@ -120,6 +123,8 @@ class BaseFastAPIService:
self.logger.info(f"Distributed tracing enabled for {self.service_name}")
except Exception as e:
self.logger.warning(f"Failed to setup tracing, continuing without it: {e}")
else:
self.logger.info(f"Distributed tracing disabled for {self.service_name}")
# Setup lifespan
self.app.router.lifespan_context = self._create_lifespan()