Fix body size, receive (elapsed time) and timestamps (#258)

* Fix the HTTP body size (it's not applicable to AMQP and Kafka)

* Fix the elapsed time

* Change JSON fields from snake_case to camelCase
This commit is contained in:
M. Mert Yıldıran
2021-09-04 17:15:39 +03:00
committed by GitHub
parent 366c1d0c6c
commit 4e0ff74944
14 changed files with 98 additions and 67 deletions

View File

@@ -237,10 +237,11 @@ func GetEntry(c *gin.Context) {
// })
// }
extension := extensionsMap[entryData.ProtocolName]
protocol, representation, _ := extension.Dissector.Represent(&entryData)
protocol, representation, bodySize, _ := extension.Dissector.Represent(&entryData)
c.JSON(http.StatusOK, tapApi.MizuEntryWrapper{
Protocol: protocol,
Representation: string(representation),
BodySize: bodySize,
Data: entryData,
})
}