-
Notifications
You must be signed in to change notification settings - Fork 63
Add large buffer support for Kafka #1034
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: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1034 +/- ##
==========================================
- Coverage 47.24% 47.20% -0.05%
==========================================
Files 260 260
Lines 27370 27382 +12
==========================================
- Hits 12932 12926 -6
- Misses 13576 13594 +18
Partials 862 862
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mariomac
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.
LGTM! Before approving/merging, I'll wait for the final approval from Stephen, as he had some comments.
grcevski
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.
This looks great @pinoOgni !
Since the Kafka protocol has many edge cases in the parsing logic, do you think it would be possible to add C based unit test? We used to have some in the past, but we've removed them, since the code that was tested was removed too.
I'll find a commit and show you what we had.
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
- previously there was a bug so is_server value was wrong Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
- remove check on multiple api keys - clean up code - use kafka_parse_fixup_response_header in kafka_send_large_buffer to be sure that data is not divided in two - update kafka doc - fix ebpf code: if the message_size is taken from the ebpf map it needs to be converted in network byte order Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
testTimeout Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
…rintouts Signed-off-by: Giuseppe Ognibene <giuseppe.ognibene@coralogix.com>
|
Hi @grcevski, thanks so much for the advice! I followed your example and created a unit test for Kafka. I tested the two main functions P.s. Thanks to the unit test, I found a bug in the ebpf code that the integration tests hadn't detected! |
grcevski
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.
LGTM! Thanks for doing this.
This PR continues the work done #512
Now OBI parses kafka data in kernel space and it sends a large buffer event to the userspace. In this way we can parse big
MetadataResponse. This is really useful when the packet is too big, for example when there are multiple brokers and unfortunately the needed topic is after that.A dedicated integration test has also been added to test only Kafka large buffer with 3 Kafka brokers, allowing for a list of brokers and increasing the size of the
MetadataResponse.Since we need the
MetadataResponseto create the spans, in the testServer theConsumerhas been configured to trigger theMetadatarefresh so that OBI can capture it.Finally, to increase the size of the packet, an ad hoc topic name was used, it is a poem on OBI (written by Gemini not by me).