Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Capture the correct log caller #605

Merged
merged 1 commit into from
Sep 2, 2024
Merged

fix: Capture the correct log caller #605

merged 1 commit into from
Sep 2, 2024

Conversation

GSVarsha
Copy link
Contributor

@GSVarsha GSVarsha commented Aug 30, 2024

What

Python version >= 3.13

log_with_instana -> __call__ -> custom_func
stacklevel1 -> stacklevel2 -> stacklevel3

Python version < 3.13

log_with_instana -> custom_func
stacklevel1 -> stacklevel2

Why

Bug reported by a customer: #563

Before the changes

BEFORE instana import
funcName:custom_func message:Hello, world

AFTER instana import
funcName:log_with_instana message:Hello, world

After the changes

BEFORE instana import
funcName:custom_func message:Hello, world

AFTER instana import
funcName:custom_func message:Hello, world

Signed-off-by: Varsha GS <varsha.gs@ibm.com>
@GSVarsha GSVarsha self-assigned this Aug 30, 2024
@GSVarsha GSVarsha added bug wip work in progress labels Aug 30, 2024
@GSVarsha GSVarsha added this to the H2-2024 milestone Aug 30, 2024
@GSVarsha GSVarsha added Review & Merge and removed wip work in progress labels Sep 2, 2024
@GSVarsha GSVarsha requested a review from pvital September 2, 2024 07:47
@GSVarsha GSVarsha marked this pull request as ready for review September 2, 2024 07:47
Copy link
Member

@pvital pvital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

@GSVarsha GSVarsha merged commit fded599 into master Sep 2, 2024
14 of 15 checks passed
@GSVarsha GSVarsha deleted the fix_log_caller branch September 2, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: python-sensor overrides funcName which logs the message with log_with_instana
2 participants