Skip to content

Conversation

Flash0ver
Copy link
Member

Summary

Flush the Logs-Buffer of the SentryStructuredLogger when the app terminates ungracefully.

Remarks

In #4310, we added a Buffer for Logs, and implemented a Batching & Flushing strategy.
We did test and cover the case to Flush the Logs when the Hub is disposed, which includes the case when the App closes gracefully, triggered through ProcessExit.

But we missed to test and cover the case when the consuming App crashes.

Changes

  • Flush the Structured Logs Buffer on UnhandledException, just before flushing the ISentryClient

@Flash0ver
Copy link
Member Author

@sentry review

Copy link
Collaborator

@jamescrosswell jamescrosswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Flash0ver
Copy link
Member Author

@cursor cancel

Copy link

cursor bot commented Aug 14, 2025

Unable to authenticate your request. Please make sure to connect your GitHub account to Cursor. Go to Cursor

@Flash0ver
Copy link
Member Author

@cursor stop

Copy link

cursor bot commented Aug 14, 2025

Unable to authenticate your request. Please make sure to connect your GitHub account to Cursor. Go to Cursor

@Flash0ver Flash0ver merged commit b6fb323 into main Aug 14, 2025
31 of 33 checks passed
@Flash0ver Flash0ver deleted the fix/logs-flush-on-terminating branch August 14, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants