diff --git a/cope2n-api/fwd/settings.py b/cope2n-api/fwd/settings.py index 86d4832..fe23d17 100755 --- a/cope2n-api/fwd/settings.py +++ b/cope2n-api/fwd/settings.py @@ -14,7 +14,7 @@ from pathlib import Path import environ from django.urls import reverse_lazy from fwd_api.middleware.logging_request_response_middleware import TraceIDLogFilter - +from .opentelemetry_config import setup_tracing # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -22,6 +22,11 @@ BASE_DIR = Path(__file__).resolve().parent.parent env = environ.Env( DEBUG=(bool, False) ) + +tracer_endpoint = env.str("tracer_endpoint", "http://jaeger_collector:4318") +service_name = "sbt_celery_backend" +setup_tracing(tracer_endpoint=tracer_endpoint, service_name=service_name) + DEBUG = False environ.Env.read_env(os.path.join(BASE_DIR, '.env')) ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=['*'] + ['107.120.{}.{}'.format(i, j) for i in range(256) for j in range(256)])