-
Notifications
You must be signed in to change notification settings - Fork 0
Span Buffer Multiprocess Enhancement with Health Monitoring #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: span-flusher-stable
Are you sure you want to change the base?
Span Buffer Multiprocess Enhancement with Health Monitoring #11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with metrics.timer("spans.buffer.flusher.produce"): | ||
| for _, flushed_segment in flushed_segments.items(): | ||
| with metrics.timer("spans.buffer.flusher.produce", tags={"shard": shard_tag}): | ||
| for flushed_segment in flushed_segments.values(): |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The loop variable name was changed from for _, flushed_segment to for flushed_segment, but the dictionary key is no longer being unpacked. This is a minor inconsistency - consider keeping the unpacking pattern for shard, flushed_segment to maintain clarity about what the dictionary keys represent, especially since shard information is now important in this multiprocess context.
| for flushed_segment in flushed_segments.values(): | |
| for shard, flushed_segment in flushed_segments.items(): |
| if isinstance(process, multiprocessing.Process): | ||
| process.kill() |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isinstance check is redundant here since the kill() method exists on threading.Thread as well (it's just not typically used). However, the more important issue is that this code only kills multiprocessing.Process instances but not Thread instances, which could leave threads running. Consider handling both types or document why threads don't need to be terminated.
| process = make_process( | ||
| target=target, | ||
| args=( | ||
| shards, |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The shards parameter is now passed to the main() method but the corresponding function signature at line 137 shows it's the second parameter. This creates a coupling where the order of arguments in the tuple must exactly match the function signature. Consider using keyword arguments or documenting this dependency more clearly.
Test 6
Replicated from ai-code-review-evaluation/sentry-copilot#5