-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add LogEventDropped handler to the NetworkTarget #5101
Conversation
Thanks for opening this pull request! |
9182c19
to
4d94761
Compare
fc580ef
to
352d7d7
Compare
@ShadowDancer Thank you for the contribution, and finding all the locations where LogEvents are dropped. Excellent work. Any reason why the dropped-EventArgs is different from AsyncTargetWrapper ? (Not including the LogEvent) I recognize that it will give better performance, but curious if the inconsistency is good? |
@snakefoot QueuedNetworkSender operates on buffers of bytes, it does not have concept of LogEvent (it operates on buffers instead). I've taken simple approach and unified event across all call sites. I think LogEvent does not matter for this use case, as I want to know if there is backpressure on logshipper - in that case you probably cannot do anything with these logs anyway. |
This simplifies NetworkTarget logic as it does not make sense to have network target without buffer.
a1866b0
to
61d92bf
Compare
374dc80
to
f3e9125
Compare
Kudos, SonarCloud Quality Gate passed! |
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 it looks good. And thank you for the unit-tests. Any last changes before merging?
Not really, go ahead :) |
Hooray your first pull request is merged! Thanks for the contribution! Looking for more? 👼 Please check the up-for-grabs issues - thanks! |
Add LogEventDropped handler to the NetworkTarget. Resolves #5084
As proposed in the ticket copied implementation from
AsyncTargetWrapper
, but had to make a few tweaks due to nature of NetworkTarget (it can discard messages on multiple occasions, due to message size or number of connections).This MR assumes that NetworkTarget owns and outlives NetworkSender.
Closes #5084