Skip to content

Commit

Permalink
Http2 is equal to grpc
Browse files Browse the repository at this point in the history
**Phenomenon and reproduction steps**

**Root cause and solution**

**Impactions**

**Test method**

**Affected branch(es)**

* main

**Checklist**

- [ ] Dependencies update required
- [ ] Common bug (similar problem in other repo)
  • Loading branch information
xiaochaoren1 committed May 29, 2023
1 parent 42797d0 commit 817961f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions app/app/application/l7_flow_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,14 @@
"icon_id(resource_gl0_1) as resource_gl0_1_icon_id"
}
MERGE_KEYS = [
'l7_protocol', 'protocol', 'version', 'request_type', 'request_domain',
'request_resource', 'request_id', 'response_status', 'response_code',
'response_exception', 'response_result', 'http_proxy_client', 'trace_id',
'span_id', 'x_request_id', 'l7_protocol_str', 'endpoint'
'l7_protocol', 'protocol', 'version', 'request_id', 'http_proxy_client',
'trace_id', 'span_id', 'x_request_id', 'l7_protocol_str', 'endpoint'
]
MERGE_KEY_REQUEST = [
'l7_protocol', 'protocol', 'version', 'request_type', 'request_domain',
'request_resource', 'request_id', 'trace_id', 'span_id', 'l7_protocol_str',
'endpoint'
]
MERGE_KEY_RESPONSE = [
'response_status', 'response_code', 'response_exception',
'response_result', 'http_proxy_client'
'l7_protocol', 'protocol', 'version', 'request_id', 'trace_id', 'span_id',
'l7_protocol_str', 'endpoint'
]
MERGE_KEY_RESPONSE = ['http_proxy_client']
DATABASE = "flow_log"


Expand Down Expand Up @@ -740,6 +734,15 @@ def add_flow(self, flow, network_delay_us):
continue
if self.get(key) and flow.get(key) and (self.get(key) !=
flow.get(key)):
# http2 == grpc
if key == 'l7_protocol' and self.get(key) in [
21, 41
] and flow.get(key) in [21, 41]:
continue
elif key == 'l7_protocol_str' and self.get(key) in [
'HTTP2', 'gRPC'
] and flow.get(key) in ['HTTP2', 'gRPC']:
continue
return False
if abs(self.start_time_us -
flow["start_time_us"]) > network_delay_us or abs(
Expand Down

0 comments on commit 817961f

Please sign in to comment.