instana / python-sensor

:snake: Python Distributed Tracing & Metrics Sensor for Instana
https://www.instana.com/
MIT License
69 stars 31 forks source link

Adapt to logger's incoming stacklevel #660

Closed GSVarsha closed 2 weeks ago

GSVarsha commented 2 weeks ago

Related to https://github.com/instana/python-sensor/pull/652

Bypass the stack level of our instrumentation when the keyword stacklevel is set as well.

Before the changes py3.11

log_with_instana -> log_custom_warning -> main stacklevel1 -> stacklevel2 -> stacklevel3

After the changes py3.11

log_custom_warning -> main -> test_log_caller_with_stacklevel stacklevel1 -> stacklevel2 -> stacklevel3