Skip to content

Commit

Permalink
Log instrumentation only when successful
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
unflxw committed Apr 25, 2024
1 parent 94f0529 commit 5133545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/appsignal/opentelemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5133545

Please sign in to comment.