-
Notifications
You must be signed in to change notification settings - Fork 15
fix(traces): use channel-based aggregator #909
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
Conversation
| } | ||
| if response_tx.send(batches).is_err() { | ||
| error!("Failed to send trace flush response - receiver dropped"); | ||
| } |
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.
would be great to log the error details.
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 the error here just contains the data that failed to send
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 am thinking of sth like below. It will give us more context in case of errors.
if let Err(e) = response_tx.send(batches) {
error!("Failed to send trace flush response : {}", e);
}
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 tried this, but here the error is the Vec<Vec<SendDataBuilder>> of data that failed to send and doesn't have additional context I believe
litianningdatadog
left a comment
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.
Overall LGTM
Use a channel-based aggregator for traces to avoid locking on aggregation. Adds an aggregator service which receives incoming commands on a channel. Commands can be to insert payloads, get batches, and shutdown.
Follows a similar pattern as #879. Tested with self-monitoring and tested that dual shipping still works as well.
SVLS-7647