Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Log Collector implementation to reduce latency by replacing the internal queue approach with a synchronous send method similar to what is used in the Log Storage module. Key changes include:
- Converting the send() method from asynchronous to a synchronous function that accepts timestamp and message arguments.
- Adapting test cases to patch and call send() instead of store(), with adjustments to the test classes accordingly.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/logcollector/test_collector.py | Updated test cases to reflect the new synchronous send() interface and updated mocking accordingly. |
| src/logcollector/collector.py | Modified start(), fetch(), and send() methods to implement the new, low-latency Log Collector design. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
- Coverage 98.90% 98.88% -0.02%
==========================================
Files 15 15
Lines 1455 1437 -18
Branches 151 149 -2
==========================================
- Hits 1439 1421 -18
Misses 9 9
Partials 7 7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
The Log Collector used to have a high latency. This PR changed its implementation from an internal queue to the same approach used in the Log Storage module. First tests show a drastic improvement in latency.
Resolves #71.