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

[Bug]: python-sensor overrides funcName which logs the message with log_with_instana #563

Closed
staaam opened this issue Jul 25, 2024 · 8 comments · Fixed by #605
Closed

[Bug]: python-sensor overrides funcName which logs the message with log_with_instana #563

staaam opened this issue Jul 25, 2024 · 8 comments · Fixed by #605
Assignees
Labels
Milestone

Comments

@staaam
Copy link

staaam commented Jul 25, 2024

Problem Description

Instana python-sensor overrides funcName which logs the message with log_with_instana

Impact: we're writing funcName for every message for easier understanding of the message origin, and currently we see log_with_instana in all places instead.

Minimal, Complete, Verifiable, Example

import logging


def random_func():
    logging.info("Hello, world")


if __name__ == '__main__':
    logging.basicConfig(level=logging.INFO, format="funcName:%(funcName)s message:%(message)s")
    random_func()

    import instana
    random_func()

Expected output:

funcName:random_func message:Hello, world
funcName:random_func message:Hello, world

Actual output:

funcName:random_func message:Hello, world
funcName:log_with_instana message:Hello, world

Python Version

Python 3

Python Modules

instana @ https://github.com/instana/python-sensor/archive/refs/tags/v2.4.0.zip

Python Environment

-
@staaam staaam added the bug label Jul 25, 2024
@GSVarsha GSVarsha self-assigned this Jul 30, 2024
@GSVarsha
Copy link
Contributor

Hi @staaam, thank you for reaching out to us. I just installed the same instana module version with pip install -e git+https://github.com/instana/python-sensor@v2.4.0#egg=instana and ran the same snippet you provided and it works fine for me.

BEFORE instana import
funcName:random_func message:Hello, world
AFTER instana import
funcName:random_func message:Hello, world

@GSVarsha GSVarsha removed the bug label Jul 30, 2024
@staaam
Copy link
Author

staaam commented Jul 31, 2024

oh, could it be related to python3.12 ?
UPD: just checked, loooks like python3.10 works as expected, but 3.11/3.12 has this issue
UPD2: also upgraded to python-sensor 2.5.1 - also happens

@GSVarsha
Copy link
Contributor

GSVarsha commented Aug 1, 2024

Hi @staaam, thanks for the update!
Yeah, I checked with python 3.10.13 and it works but when I checked with python 3.11.0 and 3.12.0 I could see the same issue you're facing.

Is it possible for you to use python 3.10 until we figure out what we could do about this?

@staaam
Copy link
Author

staaam commented Aug 1, 2024

thanks!
Unfortunately no, we've just recently migrated to python3.12 and go back is not an option.
Worth saying, that at the moment it's not an urgent issue for us, so I think we can wait for this to be fixed...

@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 linked a pull request Aug 30, 2024 that will close this issue
@pvital pvital removed the wip work in progress label Sep 2, 2024
@staaam
Copy link
Author

staaam commented Sep 16, 2024

thanks! looks like this solves the issue. Any estimation when version with the fix will be released?

@GSVarsha
Copy link
Contributor

thanks! looks like this solves the issue. Any estimation when version with the fix will be released?

Hi @staaam, the fix is already available on the master branch, I will release a new version with the fix before tomorrow and will update you here!

@GSVarsha
Copy link
Contributor

GSVarsha commented Sep 16, 2024

Hello @staaam, we've released the new version with the fix. You can install the same using the command below:

pip install git+https://github.com/instana/python-sensor@v2.5.3

Do let us know if you need anything else, thanks!

@staaam
Copy link
Author

staaam commented Sep 17, 2024

thank you! 🙏

@instana instana deleted a comment from PavinStrickland Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants