Skip to content

Commit

Permalink
compact: Include DNS observation source
Browse files Browse the repository at this point in the history
Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
  • Loading branch information
michi-covalent committed Oct 26, 2022
1 parent 21a3eff commit 86233b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ func GetFlowType(f *pb.Flow) string {
l7Protocol = "http"
case *pb.Layer7_Dns:
l7Protocol = "dns"
l7Type += " " + l7.GetDns().ObservationSource
case *pb.Layer7_Kafka:
l7Protocol = "kafka"
}
Expand Down
8 changes: 5 additions & 3 deletions pkg/printer/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,15 +620,17 @@ func Test_getFlowType(t *testing.T) {
args: args{
f: &pb.Flow{
L7: &pb.Layer7{
Type: pb.L7FlowType_REQUEST,
Record: &pb.Layer7_Dns{},
Type: pb.L7FlowType_REQUEST,
Record: &pb.Layer7_Dns{
Dns: &pb.DNS{ObservationSource: "proxy"},
},
},
EventType: &pb.CiliumEventType{
Type: monitorAPI.MessageTypeAccessLog,
},
},
},
want: "dns-request",
want: "dns-request proxy",
},
{
name: "L4",
Expand Down

0 comments on commit 86233b6

Please sign in to comment.