observability-cli icon indicating copy to clipboard operation
observability-cli copied to clipboard

[POA-155] Capture client/server timeouts as well as Agent parsing errors

Open shreys7 opened this issue 2 years ago • 0 comments

JIRA: https://postmanlabs.atlassian.net/browse/POA-155 Confluence: https://postmanlabs.atlassian.net/l/cp/EtJHwV3u

Changes

In this PR, we have added two sets of changes

  • Capture client and server timeouts
    • We have used tcpStream's Accept function for this purpose. This function gets called on every packet captured from AssembleWithContext function of tcpAssembly utility.
    • The stream holds both the flows of the connection, one for the client and one for the server. When we observer a FIN packet for a particular flow, we check if there's data present on the other side of the flow.
    • If there was no packet seen on the other side, this would indicate that one of the sides closed the connection before even receiving any date from the other side, indicating a timeout.
  • Capture agent parsing errors
    • When the Agent is not able to decode or parse the request/response body, it only used to log the error.
    • With this PR, we will now also capture the same in the method metadata error field of the witness

TODO

  • Get https://github.com/akitasoftware/akita-ir/pull/10 merged on akita-ur and then update this PR with its commit hash on the master branch.
  • Get https://github.com/akitasoftware/akita-libs/pull/201 merged on akita-libs and then update this PR with its commit hash on the master branch.

shreys7 avatar Nov 10 '23 06:11 shreys7