Skip to content

Commit

Permalink
Merge pull request #613 from uber/add-url-logging
Browse files Browse the repository at this point in the history
Add URL logging to server_http_request
  • Loading branch information
skiptomylu authored Jul 25, 2019
2 parents 8c774c1 + 8474618 commit e6898db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/server_http_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func NewServerHTTPRequest(
logFields := []zap.Field{
zap.String(logFieldEndpointID, endpoint.EndpointName),
zap.String(logFieldEndpointHandler, endpoint.HandlerName),
zap.String(logFieldRequestURL, r.URL.Path),
}

// put request scope tags on context
Expand Down
1 change: 1 addition & 0 deletions runtime/server_http_request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1665,6 +1665,7 @@ func TestIncomingHTTPRequestServerLog(t *testing.T) {
"statusCode": float64(200),
"endpointHandler": "foo",
"endpointID": "foo",
"url": "/foo",

"Accept-Encoding": "gzip",
"User-Agent": "Go-http-client/1.1",
Expand Down

0 comments on commit e6898db

Please sign in to comment.