Skip to content
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

Parse gRPC/HTTP2 requests with kprobes #649

Merged
merged 21 commits into from
Feb 29, 2024
Merged

Conversation

grcevski
Copy link
Contributor

@grcevski grcevski commented Feb 27, 2024

This PR brings support for tracking grpc and http2 requests for non-go languages. It parses a bit of the information at eBPF time and it send the actual header decoding to be done in user space.

There are few things missing from this draft:

  • We don't read the status code yet, I need to figure out how to do that
  • No integration tests

I'm mainly making the PR so I can see if the tests pass or if I've broken some of the HTTP support.

@grcevski grcevski added the do-not-merge WIP or something that musn't be merged label Feb 27, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 80.70175% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 79.18%. Comparing base (490e84f) to head (15f1f5b).

Files Patch % Lines
pkg/internal/ebpf/common/http2grpc_transform.go 80.47% 27 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #649      +/-   ##
==========================================
- Coverage   79.23%   79.18%   -0.05%     
==========================================
  Files          91       92       +1     
  Lines        7575     7746     +171     
==========================================
+ Hits         6002     6134     +132     
- Misses       1246     1277      +31     
- Partials      327      335       +8     
Flag Coverage Δ
integration-test 70.39% <80.70%> (+0.22%) ⬆️
unittests 40.22% <0.00%> (-1.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@grcevski grcevski changed the title WIP: Parse gRPC/HTTP2 requests with kprobes Parse gRPC/HTTP2 requests with kprobes Feb 28, 2024
@grcevski grcevski marked this pull request as ready for review February 28, 2024 18:01
@grcevski
Copy link
Contributor Author

I added some grpc tests, I'm going to add HTTP2 tests with our rust ssl server. I can't use the go http2 tests because we don't decode go ssl without go probes support.

@grcevski grcevski removed the do-not-merge WIP or something that musn't be merged label Feb 28, 2024
Copy link
Contributor

@mariomac mariomac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing

@grcevski grcevski merged commit 33d4081 into grafana:main Feb 29, 2024
4 checks passed
@grcevski grcevski deleted the kprobes_grpc branch February 29, 2024 15:52
@grcevski
Copy link
Contributor Author

Thanks Mario!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants