Add fine-grained stream error logging control#2805
Merged
He-Pin merged 1 commit intoapache:mainfrom Mar 30, 2026
Merged
Conversation
He-Pin
added a commit
to He-Pin/incubator-pekko
that referenced
this pull request
Mar 28, 2026
Adds configurable throttling for stream stage error log messages to prevent log spam from rapidly failing stages. Controlled via: pekko.stream.materializer.stage-errors-log-throttle-period = off When enabled (e.g., = 1s), only the first error within each period is logged. Suppressed errors are counted and reported when the period expires. This complements the fine-grained log level control added in apache#2805. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 28, 2026
4ad8c8a to
e397b16
Compare
Add configurable stream stage error log level via 'pekko.stream.materializer.stage-errors-default-log-level' config key. Supports 'error' (default), 'warning', 'info', 'debug', or 'off'. When a stage-specific LogLevels attribute is present, it takes precedence. Otherwise the system-wide default is used, enabling operators to reduce noise from expected stream errors without per-stage configuration. Changes: - Add stage-errors-default-log-level to reference.conf - Add LogLevels.defaultErrorLevel and LogLevels.fromString helpers - Update GraphInterpreter.reportStageError to use per-level logging - Update RestartFlow.loggingEnabled to respect system-wide setting - Change NoMaterializer from object to case class accepting ActorSystem (required because GraphInterpreter now accesses materializer.system) Upstream: akka/akka-core@519d33d897 Cherry-picked from akka/akka-core v2.8.0, which is now Apache licensed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e397b16 to
8d74ef4
Compare
Philippus
reviewed
Mar 30, 2026
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.
Motivation
Stream error logging was all-or-nothing with no way to control logging for specific stream stages.
Modification
Added configuration support for fine-grained control of stream error logging, allowing users to suppress expected errors while still logging unexpected ones.
Result
Users can configure stream error logging per-stage, reducing log noise from expected transient failures.
References