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

Allow sockmsg to run independently from tctracer #1799

Merged
merged 8 commits into from
Apr 10, 2025
Merged

Conversation

rafaelroquetto
Copy link
Contributor

@rafaelroquetto rafaelroquetto commented Apr 4, 2025

Allow the sockmsg and sockops programs to run independently from the tctracer. This allows the HTTP header trace context propagation to continue to operate in case the TC programs fail for whatever reason.
A new option, BEYLA_BPF_CONTEXT_PROPAGATION _ which lets you select what kind of context propagation you want to use has been introduced and supersedes BEYLA_BPF_ENABLE_CONTEXT_PROPAGATION

@rafaelroquetto rafaelroquetto force-pushed the split_tc_sockmsg branch 2 times, most recently from 050e84c to 75dda82 Compare April 4, 2025 23:38
@rafaelroquetto rafaelroquetto added the documentation Improvements or additions to documentation label Apr 4, 2025
@rafaelroquetto
Copy link
Contributor Author

Hey @grafsean, do you have any ideas what may be going with the documentation checks?

@rafaelroquetto rafaelroquetto changed the base branch from tctracer_maps to main April 4, 2025 23:40
@rafaelroquetto rafaelroquetto force-pushed the split_tc_sockmsg branch 2 times, most recently from 08f9e42 to 00ac3a7 Compare April 4, 2025 23:47
@rafaelroquetto rafaelroquetto added the do-not-merge WIP or something that musn't be merged label Apr 4, 2025
Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 79.47020% with 31 lines in your changes missing coverage. Please review.

Project coverage is 67.23%. Comparing base (2a10f4a) to head (2eb1b68).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/internal/ebpf/tpinjector/tpinjector.go 77.55% 17 Missing and 5 partials ⚠️
pkg/beyla/config.go 78.57% 2 Missing and 1 partial ⚠️
pkg/internal/ebpf/tctracer/tctracer.go 50.00% 3 Missing ⚠️
pkg/internal/discover/finder.go 80.00% 2 Missing ⚠️
pkg/config/ebpf_tracer.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1799      +/-   ##
==========================================
+ Coverage   65.36%   67.23%   +1.87%     
==========================================
  Files         203      221      +18     
  Lines       20884    22693    +1809     
==========================================
+ Hits        13650    15258    +1608     
- Misses       6360     6659     +299     
+ Partials      874      776      -98     
Flag Coverage Δ
integration-test 55.09% <74.83%> (+0.08%) ⬆️
k8s-integration-test 53.08% <68.21%> (+0.07%) ⬆️
oats-test 34.41% <66.22%> (+0.10%) ⬆️
unittests 43.41% <13.90%> (?)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rafaelroquetto rafaelroquetto removed the do-not-merge WIP or something that musn't be merged label Apr 7, 2025
@rafaelroquetto rafaelroquetto marked this pull request as ready for review April 7, 2025 17:42
@rafaelroquetto rafaelroquetto requested review from grafsean and a team as code owners April 7, 2025 17:42
@rafaelroquetto rafaelroquetto changed the title WIP - Allow sockmsg to run independently from tctracer Allow sockmsg to run independently from tctracer Apr 7, 2025
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! I really like how you've split this now. I left a few comments, to not block you I'm approving the PR, but I think we should fix the handling of the two variables now. Changing to enum is perhaps a breaking change, perhaps the trick is to choose a better name for the IP side. Essentially IP propagation can't work without context_propagation. Maybe something along the lines of disable_ip_options_context_propagation. This way we won't explicitly have to name it in the code. Alternatively, we can introduce a secondary enum, rather than replacing the enable_context_propagation boolean. The enum can be context_propagation_mode or something like that, with values: All, headersOnly,ipOptionsOnly

@rafaelroquetto
Copy link
Contributor Author

Rebased + introduced enum.

@rafaelroquetto rafaelroquetto requested a review from grcevski April 8, 2025 17:09
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for addressing the feedback!

@rafaelroquetto rafaelroquetto merged commit aad1a21 into main Apr 10, 2025
16 checks passed
@rafaelroquetto rafaelroquetto deleted the split_tc_sockmsg branch April 10, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants