From 513354510c540b71635c70cd7e6374be1f7c9a26 Mon Sep 17 00:00:00 2001 From: Noemi <45180344+unflxw@users.noreply.github.com> Date: Thu, 25 Apr 2024 15:02:20 +0200 Subject: [PATCH] Log instrumentation only when successful Do not log "Instrumenting ..." when attempting to start an instrumentation (the required dependency for which might not actually be installed) Instead, log "Instrumented ..." when an instrumentation is correctly started. --- src/appsignal/opentelemetry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appsignal/opentelemetry.py b/src/appsignal/opentelemetry.py index 3e1bab0..b174858 100644 --- a/src/appsignal/opentelemetry.py +++ b/src/appsignal/opentelemetry.py @@ -192,7 +192,7 @@ def add_instrumentations( for name, adder in _adders.items(): if name not in disable_list: try: - logger.info(f"Instrumenting {name}") adder() + logger.info(f"Instrumented {name}") except ModuleNotFoundError: pass