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

Unify HTTP SSL, K probes and NodeJS tracer in a single tracer #1215

Merged
merged 29 commits into from
Oct 11, 2024

Conversation

marctc
Copy link
Contributor

@marctc marctc commented Oct 2, 2024

This is a required step in order to reduce privileges required to run Beyla.
This PR unifies the different tracers used for non-Go programs into a generic tracer.

Fixes #1212 and #1213

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 82.12766% with 42 lines in your changes missing coverage. Please review.

Project coverage is 81.64%. Comparing base (8c3c9db) to head (fe61e4e).

Files with missing lines Patch % Lines
pkg/internal/ebpf/tracer_linux.go 41.66% 10 Missing and 4 partials ⚠️
pkg/internal/ebpf/instrumenter.go 83.33% 7 Missing and 4 partials ⚠️
pkg/internal/discover/attacher.go 79.41% 4 Missing and 3 partials ⚠️
pkg/internal/ebpf/generictracer/generictracer.go 95.19% 2 Missing and 3 partials ⚠️
pkg/internal/ebpf/gotracer/gotracer.go 0.00% 3 Missing ⚠️
pkg/internal/ebpf/logger/logger.go 0.00% 1 Missing ⚠️
pkg/internal/ebpf/watcher/watcher.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1215      +/-   ##
==========================================
- Coverage   81.89%   81.64%   -0.26%     
==========================================
  Files         137      135       -2     
  Lines       11489    11435      -54     
==========================================
- Hits         9409     9336      -73     
- Misses       1544     1561      +17     
- Partials      536      538       +2     
Flag Coverage Δ
integration-test 60.47% <77.44%> (-0.55%) ⬇️
k8s-integration-test 58.91% <77.87%> (+0.41%) ⬆️
oats-test 36.54% <61.70%> (+0.11%) ⬆️
unittests 53.37% <0.00%> (+0.25%) ⬆️

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.

@mariomac
Copy link
Contributor

mariomac commented Oct 7, 2024

Isn't "generic_tracer" too generic name? If we have to change this name to avoid other confunsion/duplicities, I would maybe choose a name that describes what instruments and where are the probes attached (kernel, lib...).

@marctc marctc marked this pull request as ready for review October 10, 2024 11:52
@marctc marctc changed the title Rename http_ssl to generic_tracer Unify SSL, K probes and NodeJS tracer in a single tracer. Oct 10, 2024
@marctc marctc changed the title Unify SSL, K probes and NodeJS tracer in a single tracer. Unify SSL, K probes and NodeJS tracer in a single tracer Oct 10, 2024
@marctc marctc changed the title Unify SSL, K probes and NodeJS tracer in a single tracer Unify HTTP SSL, K probes and NodeJS tracer in a single tracer Oct 10, 2024
@marctc
Copy link
Contributor Author

marctc commented Oct 10, 2024

Isn't "generic_tracer" too generic name? If we have to change this name to avoid other confunsion/duplicities, I would maybe choose a name that describes what instruments and where are the probes attached (kernel, lib...).

Do you have any ideas? I can't think of anything better now

@grcevski
Copy link
Contributor

Isn't "generic_tracer" too generic name? If we have to change this name to avoid other confunsion/duplicities, I would maybe choose a name that describes what instruments and where are the probes attached (kernel, lib...).

Do you have any ideas? I can't think of anything better now

I'd keep it as k_tracer or use generic tracer, maybe protocol_tracer? When you think about it, what the tracer does is detect telemetry signals at the protocol level, by using kprobes and uprobes to parse send/receive buffers. As a contrast to Go tracer, which injects Go uprobes to parts of the Go libraries.

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!

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.

🚢

@marctc marctc merged commit bc125f7 into main Oct 11, 2024
12 checks passed
@marctc marctc deleted the use_generic_tracer branch October 11, 2024 14:21
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.

Split eBPF load and attach for nodejs programs.
5 participants