|
|
@@ -405,6 +405,7 @@ int uprobe_LoopyWriter_HeaderHandler(struct pt_regs *ctx) {
|
|
|
&stream_id, sizeof(stream_id), (void *)(headerFrame_ptr + (headerFrame_streamid_pos)));
|
|
|
struct apm_trace_key_t *sc_ptr = bpf_map_lookup_elem(&streamid_to_span_contexts, &stream_id);
|
|
|
if (sc_ptr == NULL) {
|
|
|
+ bpf_map_delete_elem(&streamid_to_span_contexts, &stream_id);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -412,6 +413,7 @@ int uprobe_LoopyWriter_HeaderHandler(struct pt_regs *ctx) {
|
|
|
u32 zero = 0;
|
|
|
struct header_handler_storage *storage = bpf_map_lookup_elem(&header_handler_storage_map, &zero);
|
|
|
if (!storage) {
|
|
|
+ bpf_map_delete_elem(&streamid_to_span_contexts, &stream_id);
|
|
|
bpf_printk("Failed to get header handler storage\n");
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -425,6 +427,7 @@ int uprobe_LoopyWriter_HeaderHandler(struct pt_regs *ctx) {
|
|
|
struct grpc_client_request_t *grpcClientReq = bpf_map_lookup_elem(&grpc_client_storage_map, &map_id);
|
|
|
if (grpcClientReq == NULL)
|
|
|
{
|
|
|
+ bpf_map_delete_elem(&streamid_to_span_contexts, &stream_id);
|
|
|
cw_bpf_debug("uprobe_LoopyWriter_HeaderHandler: grpcClientReq is NULL");
|
|
|
return 0;
|
|
|
}
|
|
|
@@ -441,7 +444,7 @@ int uprobe_LoopyWriter_HeaderHandler(struct pt_regs *ctx) {
|
|
|
generate_random_bytes(grpcClientReq->apm_sc.span_id, APM_SPAN_ID_SIZE);
|
|
|
copy_byte_arrays(grpcClientReq->apm_psc.assumed_app_id, grpcClientReq->apm_sc.assumed_app_id, APM_ASSUMED_APP_ID_SIZE);
|
|
|
}
|
|
|
-
|
|
|
+ bpf_map_delete_elem(&streamid_to_span_contexts, &stream_id);
|
|
|
u32 k0 = 0;
|
|
|
struct trace_conf_t *trace_conf = trace_conf_map__lookup(&k0);
|
|
|
if (trace_conf) {
|