获取更多动态,关注公众号:黑客下午茶

Shutdown and Draining

大多数 SDK 的默认行为是在后台通过网络异步发送事件。这意味着如果应用程序意外关闭,某些事件可能会丢失。SDK 提供了应对这种情况的机制。

Copied
#include <sentry.h>

sentry_shutdown();

Calling sentry_shutdown() before exiting the application is critical to avoid data loss.

After shutdown, the client cannot be used anymore. It's important to only call sentry_shutdown() immediately before shutting down the application.

You can edit this page on GitHub.