You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Python program that is automatically instrumented by OpenTelemetry (OTel), and the traces are exported to a log file.
I noticed that whenever an exception is raised and unhandled, it terminates all open spans in the stack, and they are not exported to the log file. However, if I catch the exception and manually end the span, it gets recorded.
Is this the expected behavior, and if so, why?
Is there a way to configure OTel to save the spans even when they encounter an unhandled exception, and possibly add the exception as an event within the span?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a Python program that is automatically instrumented by OpenTelemetry (OTel), and the traces are exported to a log file.
I noticed that whenever an exception is raised and unhandled, it terminates all open spans in the stack, and they are not exported to the log file. However, if I catch the exception and manually end the span, it gets recorded.
Is this the expected behavior, and if so, why?
Is there a way to configure OTel to save the spans even when they encounter an unhandled exception, and possibly add the exception as an event within the span?
Beta Was this translation helpful? Give feedback.
All reactions