-
Notifications
You must be signed in to change notification settings - Fork 661
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
Encounter Invalid type <class 'NoneType'> of value None issue. #4392
Comments
Would be nice to understand what is the value that is
|
@xrmx
|
This issue happened in the following code: Line 94 in 58f2d16
Maybe I can update the following to filter out None values and then convert them to another type, such as an empty string: Lines 69 to 90 in 58f2d16
I found that PB2AnyValue imported from opentelemetry.proto.common.v1.common_pb2 does not have a type of None. |
I checked the unit test code: Lines 91 to 93 in 58f2d16
Originally, if the dictionary contains a None key, it throws an exception. Should it support None as a value in the future? |
|
@xrmx OK, Thanks. |
Describe your environment
OS: AWS Ubuntu
telemetry.auto.version: 0.50b0
telemetry.sdk.language: python
telemetry.sdk.name: opentelemetry
telemetry.sdk.version: 1.29.0
What happened?
When I was developing a backend using Python FastAPI, an internal error occurred, throwing an exception. Normally, I should be able to find the error logs in Loki, but for some unknown reason, an OpenTelemetry error was triggered instead, making it impossible for me to trace the application's errors.
My exception should have contained data, but OpenTelemetry displayed it as
None
, which is very strange. However, even in such cases, it should still be able to display the information correctly. It seems I need to ensure that the body can function properly even if it isNone
.Steps to Reproduce
Actual Result
Additional context
No response
Would you like to implement a fix?
Yes
The text was updated successfully, but these errors were encountered: