Skip to content

Commit

Permalink
change istio json struct
Browse files Browse the repository at this point in the history
  • Loading branch information
bentol committed Jul 27, 2021
1 parent 4e93c2c commit 6cab48e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions parser/istioparser/istioparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ func (j *IstioParser) ParseString(line string) (map[string]string, error) {
"status": j.GetValue(fields, "response_code", ""),
"time_local": j.GetValue(fields, "start_time", ""),
"upstream_cluster": j.GetUpstreamCluster(fields),
"authority": j.GetValue(fields, "authority", ""),
}
return result, nil
}
Expand Down
1 change: 1 addition & 0 deletions parser/istioparser/istioparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestIstioParse(t *testing.T) {
"request": "PUT /v1/order/2145 HTTP/1.1",
"request_method": "PUT",
"upstream_cluster": "payment-service",
"authority": "payment.example.com",
}
if !reflect.DeepEqual(got, want) {
t.Errorf("IstioParser.Parse(), got:\n%v\nwant\n%v", got, want)
Expand Down

0 comments on commit 6cab48e

Please sign in to comment.