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

Separate code for different eBPF samplers #81

Closed
mariomac opened this issue Apr 24, 2023 · 0 comments
Closed

Separate code for different eBPF samplers #81

mariomac opened this issue Apr 24, 2023 · 0 comments
Assignees

Comments

@mariomac
Copy link
Contributor

Currently we track GRPC, Goroutines and HTTP in a single file. This will be a bit unmaintainable as long as we keep growing in languages and libraries.

Currently, the instrumenter looks for the offsets of all the instrumentable functions (GRPC, goroutine queuing, HTTP...) and returns a map with all the found offsets, which are passed to a single eBPF loader.

I'd suggest to do the following architectural change:

The instrumenter should look for all the instrumentable functions, but should return multiple maps that would trigger different parts of the code selectively (for example, if only net/http Serve functions are found, load the BPF code of the HTTP tracer and the BPF code for the Goroutine tracer).

This will require:

  • splitting the go_nethttp.c code into go_grpc.c, go_server_common.c etc.... This will require multiple ebpf/... subpackages.
  • Optionally, sharing ringbuffers when HTTP and GRPC are traced at the same time.
  • Modifying the executable offsets inspector.
@mariomac mariomac self-assigned this Apr 24, 2023
@mariomac mariomac closed this as completed May 3, 2023
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

No branches or pull requests

1 participant