fix(DATAGO-126524): SSE viz queue full log spam: evict oldest message instead of dropping newest#1098
Open
amir-ghasemi wants to merge 2 commits intomainfrom
Open
fix(DATAGO-126524): SSE viz queue full log spam: evict oldest message instead of dropping newest#1098amir-ghasemi wants to merge 2 commits intomainfrom
amir-ghasemi wants to merge 2 commits intomainfrom
Conversation
…mir/fix-viz-queue
|
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.


This pull request introduces improvements to how visualization messages are managed and logged in the SSE gateway component, specifically to reduce log spam and ensure fresher data for clients during message bursts. The main changes are the addition of a per-stream drop counter and a new eviction-based queue handling strategy, along with cleanup and refactoring of related logging logic.
Visualization message queue handling and logging improvements:
_viz_stream_drop_countsdictionary to track cumulative message drop counts per stream, enabling throttled WARNING log messages during bursts. This helps operators stay informed without flooding logs. (src/solace_agent_mesh/gateway/http_sse/component.py)_put_viz_msg_to_streammethod, which implements an oldest-first eviction strategy for full queues. When the queue is full, the oldest message is evicted and the new message is inserted, with warning logs emitted once every 10 evictions per stream. (src/solace_agent_mesh/gateway/http_sse/component.py)_put_viz_msg_to_streammethod, replacing previous direct queue handling and simplifying the logic. (src/solace_agent_mesh/gateway/http_sse/component.py)Cleanup and resource management:
_viz_stream_drop_countsis cleared in thecleanupmethod to prevent stale counters and memory leaks. (src/solace_agent_mesh/gateway/http_sse/component.py)Removal of redundant and complex error handling:
src/solace_agent_mesh/gateway/http_sse/component.py)