feat(logs): add documentation for log_flush_threshold#17166
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
coolguyzone
reviewed
Mar 30, 2026
|
|
||
| <SdkOption name="log_flush_threshold" type='int|null' defaultValue='null'> | ||
|
|
||
| Set this to a positive integer to flush buffered logs automatically after that many logs have been added. When `null`, the SDK does not auto flush buffered logs. |
Contributor
There was a problem hiding this comment.
Suggested change
| Set this to a positive integer to flush buffered logs automatically after that many logs have been added. When `null`, the SDK does not auto flush buffered logs. | |
| Set this to a positive integer to flush buffered logs automatically after that many logs have been added. When set to `null`, the SDK does not auto flush buffered logs. |
coolguyzone
reviewed
Mar 30, 2026
|
|
||
| For example, if this is set to `5`, the SDK flushes when the fifth buffered log is added. After that call completes, the buffer is empty and new logs start a new batch. | ||
|
|
||
| This is mainly useful when a single request or job produces a lot of log lines, so flushing only at the end is not feasible. |
Contributor
There was a problem hiding this comment.
Suggested change
| This is mainly useful when a single request or job produces a lot of log lines, so flushing only at the end is not feasible. | |
| This is especially useful for requests or jobs that generate a high volume of logs, where waiting until the very end to flush isn’t practical. |
coolguyzone
reviewed
Mar 30, 2026
|
|
||
| ## Logs | ||
|
|
||
| To send Laravel logs to Sentry, enable logs in your `.env` file or in `config/sentry.php`. If a single request, command, or job can produce a lot of log lines, `SENTRY_LOG_FLUSH_THRESHOLD` lets the SDK send partial batches before it finishes. |
Contributor
There was a problem hiding this comment.
Suggested change
| To send Laravel logs to Sentry, enable logs in your `.env` file or in `config/sentry.php`. If a single request, command, or job can produce a lot of log lines, `SENTRY_LOG_FLUSH_THRESHOLD` lets the SDK send partial batches before it finishes. | |
| To send Laravel logs to Sentry, enable logs in your `.env` file or in `config/sentry.php`. If a single request, command, or job can produce a high volume of logs, `SENTRY_LOG_FLUSH_THRESHOLD` lets the SDK send partial log batches before it finishes. |
coolguyzone
reviewed
Mar 30, 2026
|
|
||
| ## Automatic Log Flushing | ||
|
|
||
| Laravel already flushes the Sentry log handler when a request, command, or job finishes. If a single request, command, or job can produce a lot of log lines, set `SENTRY_LOG_FLUSH_THRESHOLD` to send partial batches before it completes. |
Contributor
There was a problem hiding this comment.
Suggested change
| Laravel already flushes the Sentry log handler when a request, command, or job finishes. If a single request, command, or job can produce a lot of log lines, set `SENTRY_LOG_FLUSH_THRESHOLD` to send partial batches before it completes. | |
| Laravel already flushes the Sentry log handler when a request, command, or job finishes. If a single request, command, or job can produce a high volume of logs, set `SENTRY_LOG_FLUSH_THRESHOLD` to send partial log batches before it completes. |
coolguyzone
reviewed
Mar 30, 2026
| log_flush_threshold: 5 | ||
| ``` | ||
|
|
||
| This is mainly useful when a single request or command produces a lot of log lines, so flushing only at the end is not feasible. |
Contributor
There was a problem hiding this comment.
Suggested change
| This is mainly useful when a single request or command produces a lot of log lines, so flushing only at the end is not feasible. | |
| This is especially useful for requests or jobs that generate a high volume of logs, where waiting until the very end to flush isn’t practical. |
coolguyzone
reviewed
Mar 30, 2026
|
|
||
| ## Automatic Log Flushing | ||
|
|
||
| Symfony already flushes the Sentry log handler when a request or command finishes. If a single request or command can produce a lot of log lines, set `log_flush_threshold` to send partial batches before it completes. |
Contributor
There was a problem hiding this comment.
Suggested change
| Symfony already flushes the Sentry log handler when a request or command finishes. If a single request or command can produce a lot of log lines, set `log_flush_threshold` to send partial batches before it completes. | |
| Symfony already flushes the Sentry log handler when a request or command finishes. If a single request or command can produce a high volume of logs, set `log_flush_threshold` to send partial log batches before it completes. |
coolguyzone
approved these changes
Mar 30, 2026
Contributor
coolguyzone
left a comment
There was a problem hiding this comment.
Added a few rewording suggestions, but overall looks good! Thanks for adding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
Tell us what you're changing and why. If your PR resolves an issue, please link it so it closes automatically.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
EXTRA RESOURCES