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

gRPC tracing for newer versions of grpc #1877

Open
ysfess22 opened this issue Apr 19, 2024 · 0 comments
Open

gRPC tracing for newer versions of grpc #1877

ysfess22 opened this issue Apr 19, 2024 · 0 comments

Comments

@ysfess22
Copy link

ysfess22 commented Apr 19, 2024

Is your feature request related to a problem? Please describe.
Hi, I'm trying to use the grpc tracer, where uprobes are hooked to specific functions in order to intercept sent and received grpc payloads. One thing I noticed is that the offset when reading a pointer from the tracee's memory is related to the used grpc version. The supported grpc_c versions are hardcoded. I'm wondering if there are any plans to support newer grpc versions or if there is an automated way to figure the offset for a given grpc version. Using something like "offsetof" from "stddef.h" can provide some values but I noticed it's not really accurate.

Describe the solution you'd like
Either support for newer grpc versions (e.g., v1.5*.*) or a reliable and automated approach to calculate the offset.

Describe alternatives you've considered
Basically, I tried instrumenting the grpc code to figure the offset for the field "send_initial_metadata" in the "grpc_chttp2_stream" class but the values I get are different that the values in the grpc_tracer. I'm not sure my approach is the most reliable to do this, so I'm wondering how the grpc_tracer authors proceeded to calculate field offsets, especially that factors such as compiler padding might have an impact.

Thank you!

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