-
Notifications
You must be signed in to change notification settings - Fork 699
OTLP Exporter cannot handle Exceptions #4514
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
Comments
This is a dup of #4509 |
Thanks @xrmx for linking the issues! I tested the changes of @lukaslihotzki-f locally and it resolves the bug. However, I don't think it is an ideal solution. Please hear me out considering this example:
This will generate two (three actually) log entries:
I know, you are supposed to use My suggestion would be to use |
Describe your environment
OS: Windows
Python version: Python 3.12.3
SDK version: 1.31.1
API version: 1.31.1
What happened?
OTLP cannot export, if an exception Object is logged.
Steps to Reproduce
grafana/otel-lgtm
)logger.debug(Exception("This is a Test"))
Expected Result
Exception is logged and exported to OTEL
Actual Result
Logs will contain following entry:
level:
ERROR
message:
"Exception while exporting logs."
exception_stacktrace:
Additional context
Looking at the stacktrace, my guess would be to extend following function with handling for Exception types:
(
opentelemetry/exporter/otlp/proto/common/_internal/__init__.py
)However, I am completely unfamiliar with the Architecture and Structure of this Project. This is why this ticket and the kind request to enable logging Excepion Objects.
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: