Skip to content

Commit 3dc024e

Browse files
taloricsharang
authored andcommitted
fix l7_protocol_str diff validate
1 parent fda853e commit 3dc024e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

app/app/application/l7_flow_tracing.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ async def query_and_trace_flowmetas(
221221
syscall_trace_ids = set() # set(str(syscall_trace_id))
222222
x_request_ids = set() # set(x_request_id)
223223
allowed_trace_ids = set() # 所有被允许的 trace_id 集合
224-
app_spans_from_external = [] # 主动调用 APM API 或由 Tracing Completion API 传入
224+
app_spans_from_external = [
225+
] # 主动调用 APM API 或由 Tracing Completion API 传入
225226

226227
new_trace_ids_in_prev_iteration = set() # 上一轮迭代过程中发现的新 trace_id 集合
227228

@@ -935,7 +936,11 @@ def flow_field_conflict(cls, lhs: TraceInfo, rhs: TraceInfo) -> bool:
935936
is_http2_grpc_and_differ = True
936937
continue
937938

938-
if key == 'request_resource' and is_http2_grpc_and_differ:
939+
if is_http2_grpc_and_differ and key == 'l7_protocol_str':
940+
# 当已经确认 l7_protocol 忽略差异时,不用比较 l7_protocol_str
941+
continue
942+
943+
if is_http2_grpc_and_differ and key == 'request_resource':
939944
# 某些情况下同一股流量在不同位置可能会被 Agent 分别解析为 HTTP2 和 gRPC
940945
# 目前这两种协议的 request_resource 取自不同的协议字段,详见下面的文档:
941946
# https://deepflow.io/docs/zh/features/universal-map/l7-protocols/#http2

0 commit comments

Comments
 (0)