diff --git a/parser/istioparser/istioparser.go b/parser/istioparser/istioparser.go index 5d7c335..66cf160 100644 --- a/parser/istioparser/istioparser.go +++ b/parser/istioparser/istioparser.go @@ -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 } diff --git a/parser/istioparser/istioparser_test.go b/parser/istioparser/istioparser_test.go index 9de3f1c..70fed25 100644 --- a/parser/istioparser/istioparser_test.go +++ b/parser/istioparser/istioparser_test.go @@ -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)