opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

Invalid type _FixedFindCallerLogger for attribute '_logger' value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types

Open folt opened this issue 11 months ago • 4 comments

Describe your environment

python = "^3.11"

opentelemetry-api = "^1.29.0" opentelemetry-sdk = "^1.29.0" opentelemetry-distro = {extras = ["otlp"], version = "^0.50b0"} opentelemetry-instrumentation = "^0.50b0" opentelemetry-semantic-conventions = "^0.50b0"

What happened?

fix https://github.com/open-telemetry/opentelemetry-python/issues/3649

I get the same multiple logs. This significantly increases the size of my logs. I use structlog + open-telemetry. Maybe it's worth creating customizable log attribute filters via the environment that would do the DROP_ATTRIBUTES logic from the example above?

Steps to Reproduce

Use opentelemetry-python + structlog

Expected Result

Logs come without repetitions

Actual Result

As a result, we get a large volume of logs with repeating content

Additional context

No response

Would you like to implement a fix?

None

folt avatar Jan 29 '25 17:01 folt

I've already done the work for this in my fork - the fix is extremely simple.

However, according to discussion other issues here around logging, it seems that there's a consensus that the SDK project shouldn't be accommodating other logging libraries.

I'll gladly make a PR with the fix if we can make a small exception.

roger-collins-self avatar Feb 03 '25 02:02 roger-collins-self

Thanks for the answer @roger-collins-self , can you tell me what your solution is? https://github.com/open-telemetry/opentelemetry-python/issues/3649#issuecomment-2295549483

folt avatar Feb 11 '25 09:02 folt

Is there any update on this issue ?

renre-david-lynam avatar Sep 18 '25 05:09 renre-david-lynam

@renre-david-lynam could you please post a reproducer and the full stacktrace?

xrmx avatar Sep 18 '25 07:09 xrmx