Skip to content
Snippets Groups Projects
Commit 2b0d58f7 authored by Francé Wilke's avatar Francé Wilke
Browse files

Don't cutoff api-log body, the SQS messenger will handle this now

parent a471e02c
Branches
Tags
No related merge requests found
......@@ -18,12 +18,6 @@ func GenerateIncomingAPILog(startTime time.Time, requestID *string, claim map[st
currentRequestID = *requestID
}
// SQS has a 256KB limit, so let's limit the response to 96KB
responseBody := res.Body
if len(responseBody) > 12000 {
responseBody = responseBody[:12000] + "..."
}
var authType string
var authUsername string
if req.RequestContext.Identity.CognitoAuthenticationType != "" {
......@@ -93,7 +87,7 @@ func GenerateIncomingAPILog(startTime time.Time, requestID *string, claim map[st
Response: ApiLogResponse{
Headers: res.Headers,
BodySize: len(res.Body),
Body: responseBody,
Body: res.Body,
},
}
......@@ -113,12 +107,6 @@ func GenerateOutgoingAPILog(startTime time.Time, requestID *string, claim map[st
currentRequestID = *requestID
}
// SQS has a 256KB limit, so let's limit the response to 96KB
originalResponseBody := responseBody
if len(responseBody) > 12000 {
responseBody = responseBody[:12000] + "..."
}
userID, _ := claim["UserID"].(int64)
username, _ := claim["Username"].(string)
accountID, _ := claim["AccountID"].(int64)
......@@ -159,7 +147,7 @@ func GenerateOutgoingAPILog(startTime time.Time, requestID *string, claim map[st
},
Response: ApiLogResponse{
Headers: requestHeaders,
BodySize: len(originalResponseBody),
BodySize: len(responseBody),
Body: responseBody,
},
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment