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

Fix gRPC instrumentation on older kernels #576

Merged
merged 5 commits into from
Dec 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ UPROBE_RETURN(server_handleStream, struct grpc_request_t, grpc_events, events, 4
SEC("uprobe/http2Server_operateHeader")
int uprobe_http2Server_operateHeader(struct pt_regs *ctx)
{
u64 frame_pos = 2;
if (is_new_frame_pos) {
frame_pos = 4;
}
void *frame_ptr = get_argument(ctx, frame_pos);
void *frame_ptr = is_new_frame_pos ? get_argument(ctx, 4) : get_argument(ctx, 2);
struct go_slice header_fields = {};
bpf_probe_read(&header_fields, sizeof(header_fields), (void *)(frame_ptr + frame_fields_pos));
char key[W3C_KEY_LENGTH] = "traceparent";
Expand Down
Loading