diff --git a/src/instana/instrumentation/logging.py b/src/instana/instrumentation/logging.py index db547610..4efc265a 100644 --- a/src/instana/instrumentation/logging.py +++ b/src/instana/instrumentation/logging.py @@ -26,7 +26,7 @@ def log_with_instana( # We take into consideration if `stacklevel` is already present in `kwargs`. # This prevents the error `_log() got multiple values for keyword argument 'stacklevel'` stacklevel_in = kwargs.pop("stacklevel", 1) - stacklevel = stacklevel_in + 1 + stacklevel = stacklevel_in + 1 + (sys.version_info >= (3, 14)) try: # Only needed if we're tracing and serious log