Skip to content

Commit

Permalink
fix service name is displayed as IP #20787
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 authored and LYootsz committed Apr 19, 2023
1 parent 4a34aa8 commit edead5a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions app/app/application/l7_flow_tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ def to_sql_filter(self) -> str:
syscall_trace_id_response=self.syscall_trace_id_response))
if not sql_filters:
return '1!=1'
# filter time range to prune
sql = f"vtap_id={self.vtap_id} AND start_time <=fromUnixTimestamp64Micro({self.end_time_us}) AND end_time >=fromUnixTimestamp64Micro({self.start_time_us}) AND ({' OR '.join(sql_filters)})"
return f"({sql})"

Expand Down Expand Up @@ -867,15 +868,21 @@ def add_direct_flow(self, flow: dict):
'resource_gl2',
'process_kname',
]:
if getattr(self, key):
flow[key] = getattr(self, key)
continue
if flow['tap_side'] == TAP_SIDE_CLIENT_PROCESS:
direction_key = key + "_0"
elif flow['tap_side'] == TAP_SIDE_SERVER_PROCESS:
else:
direction_key = key + "_1"
setattr(self, key, flow[direction_key])
flow[key] = flow[direction_key]
if getattr(self, key) and key != 'resource_gl2':
flow[key] = getattr(self, key)
continue
elif not getattr(self, key):
setattr(self, key, flow[direction_key])
flow[key] = flow[direction_key]
else:
if self.resource_gl2_type in [0, 255]:
setattr(self, key, flow[direction_key])
setattr(self, 'resource_gl2_type',
flow[direction_key.replace("gl2", "gl2_type")])
self.direct_flows.append(flow)

def attach_app_flow(self, flow: dict):
Expand Down

0 comments on commit edead5a

Please sign in to comment.