Skip to content

Conversation

@JoshuaMoelans
Copy link
Member

@JoshuaMoelans JoshuaMoelans commented Oct 30, 2025

Fixes #1425

Adds a forced flush call in sentry_flush.

Details

We wait on in-progress flushes by doing

while (sentry__atomic_fetch(&g_logs_state.flushing)) {
    sentry__cpu_relax();
}

Since otherwise, we could be actively flushing from the batching thread & logs might have already been written to the secondary buffer, which we would then not be flushing with the force_flush since flushing was true (-> early exit from the flush_queue function)

@github-actions
Copy link

github-actions bot commented Oct 30, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 9e91ca3

@JoshuaMoelans JoshuaMoelans marked this pull request as ready for review October 30, 2025 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Structured Logs: follow up - Batch Processor Minimize Data Loss

2 participants