-
Notifications
You must be signed in to change notification settings - Fork 524
Closing and exporting all spans on panic (when panic=abort)? #542
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 could be challenging. The But other than the spans that in flight. You also need to try to export the ended spans cached in |
Logging active spans on crash, and logging spans that start but never end, are pretty important requirements for a tracing/logging system.
This seems like there is a design issue somewhere. |
I am not able to find any other OpenTelemetry implementation which does this automatically. For eg:, in OpenTelemetry .NET, there is this doc which describes one possible way for users to achieve this, but SDK does not do this automatically. |
Writing things to a file doesn't have the second problem, and if you do things right it doesn't have the first. I'm using tracing to output to opentelemetry. Tracing has hooks for when span's start, and continues to function in a panic hook. I get 100s of log lines in stdout, but NOTHING ends up sent to jaeger/zipkin via opentelemetry, due to an error 30s into startup. I don't know whether it is design or implementation, but all the monitoring "solutions" (jaeger, zipkin, opentelemetry, etc) that I have come across do not deal with unfinished spans (which seems to be because the span start doesn't emit anything). This seems to me a basic viability issue (for opentelemetry as a whole). Not trying to bash the maintainers here (and it seems like a wider issue anyway), just want to point out that
|
Conceptually, why is this? Could we do it the other way around? |
Related to #1209 |
I'm using tracing-opentelemetry. From what I understand, spans rely on Drop implementations to close, and until the span is closed it won't be shipped off. I'm currently using panic=abort for various reasons. I'd love to have a global method that I can call from a panic handler that will close and export all spans before exiting, to make sure enough tracing information has been sent out to debug the panic.
The text was updated successfully, but these errors were encountered: