Skip to content

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

@staaam

Description

@staaam

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

-

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions