|
|
@@ -396,7 +396,7 @@ static __always_inline long cw_inject_header2(void* headers_ptr, struct apm_span
|
|
|
}
|
|
|
|
|
|
// 00:00:1015481350055581:5450531005555981:5610250100539899:304775019cd3218a304775019cd3218a:1001025098564810:140acc88cde8773f
|
|
|
-static __always_inline long cw_inject_header3(void* headers_ptr, char * header_str,struct ebpf_proc_info* proc_info) {
|
|
|
+static __always_inline long cw_inject_header_half(void* headers_ptr, char * header_str,struct ebpf_proc_info* proc_info) {
|
|
|
// Read the key-value count - this field must be the first one in the hmap struct as documented in src/runtime/map.go
|
|
|
u64 curr_keyvalue_count = 0;
|
|
|
long res = bpf_probe_read_user(&curr_keyvalue_count, sizeof(curr_keyvalue_count), headers_ptr);
|
|
|
@@ -665,13 +665,15 @@ int uprobe_Transport_roundTrip(struct pt_regs *ctx) {
|
|
|
char val[CW_HEADER_VAL_LENGTH];
|
|
|
span_context_to_cw_string(&httpReq->apm_sc, val);
|
|
|
|
|
|
- long res2 = cw_inject_header3(headers_ptr, val,proc_info);
|
|
|
+ long res2 = cw_inject_header_half(headers_ptr, val,proc_info);
|
|
|
if (res2 < 0) {
|
|
|
cw_bpf_debug("uprobe_Transport_roundTrip: Failed to inject header");
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- bpf_tail_call(ctx, &jmp_table2, 0);
|
|
|
+ bpf_tail_call(ctx, &NAME(progs_jmp_up_map), PROG_DATA_GO_UPDATE_HEADER_UP_IDX);
|
|
|
+
|
|
|
+// bpf_tail_call(ctx, &jmp_table2, 0);
|
|
|
|
|
|
// Write event
|
|
|
// bpf_map_update_elem(&http_events, &key, httpReq, 0);
|
|
|
@@ -680,9 +682,8 @@ int uprobe_Transport_roundTrip(struct pt_regs *ctx) {
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+// bpf_prog_up__go_update_header
|
|
|
PROGUP(go_update_header)(struct pt_regs *ctx) {
|
|
|
-// return 1;
|
|
|
-
|
|
|
__u64 pid_tgid = bpf_get_current_pid_tgid();
|
|
|
__u32 tgid = pid_tgid >> 32;
|
|
|
struct ebpf_proc_info *proc_info =
|