-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: batch kept decisions #1419
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.
Generally looks great, left a couple of comments.
collect/collect.go
Outdated
if trace == nil { | ||
i.Logger.Debug().Logf("trace not found in cache for trace decision") | ||
return | ||
// Send the processed trace (only in Kept case) |
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.
I think we can consolidate these two if blocks together.
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.
I realized that we should still call send
for dropped traces since the trace_send_dropped
metric is in there and it does check against trace.Kept
inside send
anyway
Which problem is this PR solving?
The throughput of Redis pub/sub is impacted by the number of messages sent per time unit. To improve performance and ensure a higher throughput of kept messages, we need to reduce the number of kept messages sent.
This PR implements a batching strategy similar to the one used for dropped messages, reducing the frequency of sending individual kept messages.
Short description of the changes