Skip to content

Commit 28cb4b5

Browse files
committed
add note about crashes
1 parent 6dc07e6 commit 28cb4b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

develop-docs/sdk/telemetry/logs.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ SentrySDK.logger
239239

240240
Both the `Sentry.logger.X` and `Sentry.logger.emit` methods are fire-and-forget (have no return value). This means that the SDK can choose to run these methods on a separate thread or queue them up for processing later. This includes evaluating the string template, and running any internal hooks (like `beforeSendLog`). The SDK should ensure that the logs are sent in the order they are received.
241241

242+
It's important to note that putting everything immediately on a background thread has the downside of losing logs that occur directly before a crash. This will come up for Mobile SDKs. Therefore there will need to be a more robust mechanism if a separate thread is used. This mechanism will vary by platform, and the individual SDK will need to figure out the best approach for their platform.
243+
242244
## SDK Behavior
243245

244246
### Implementation

0 commit comments

Comments
 (0)