From 2f392f618b9c4c5116d1f6be43f679969ce9edc2 Mon Sep 17 00:00:00 2001 From: Trevor Riles Date: Fri, 13 Sep 2024 13:36:54 -0500 Subject: [PATCH] Initialize tracing export code to run earlier in the startup process. This avoids a race-condition with our gevent patching. --- baseplate/server/__init__.py | 1 - bin/baseplate-serve | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/baseplate/server/__init__.py b/baseplate/server/__init__.py index d162c0f47..b82474ee6 100644 --- a/baseplate/server/__init__.py +++ b/baseplate/server/__init__.py @@ -331,7 +331,6 @@ def load_app_and_run_server() -> None: logger.info("Metrics are not configured, Prometheus metrics will not be exported.") configure_logging(config, args.debug) - configure_tracing() app = make_app(config.app) listener = make_listener(args.bind) diff --git a/bin/baseplate-serve b/bin/baseplate-serve index 68452ea6c..6356a4c1d 100755 --- a/bin/baseplate-serve +++ b/bin/baseplate-serve @@ -21,6 +21,7 @@ except ImportError: pass -from baseplate.server import load_app_and_run_server +from baseplate.server import configure_tracing, load_app_and_run_server +configure_tracing() load_app_and_run_server()