I was looking at the timestamp flow variables available to be used in a messageLogging policy. I wanted to calculate some metrics based on these timestamps in an external tool.
It looks like my client sent.end and sent.start are always empty no matter what.
client.sent.end.timestamp
-1
GET
client.sent.start.timestamp
-1
GET
I created some assign message policy to assign some debug variables and I placed it at all sections of the flow (Request-preflow, request-postflow, response-preflow, response-postflow). No matter what the values are always empty.
Hi! Thanks for your question. We’re checking into it and will respond as soon as we have details. Apologies for any inconvenience and thank you for waiting.
I figured this out. The reason why I was not seeing the timestamps populated is because the logging policy was executed in “PostFlow” flow and not the “PostClientFlow”.
When I was reading the documentation I thought that PostClientFlow = PostFlow. I have since discovered this is not the case. This makes me wonder what other flows are hidden?
Also, I am not clear on what the difference between Postflow and PostClientFlow really is.
PostClientFlow executes after the response has been sent to the client. This is an ideal point to attach logic that would compute the time interval for message handling, or to perform message logging. (The former may be used in the latter). PostFlow is where you attach logic that should run after any Conditional flows. PostFlow has Request and Response sub-flows, so you can attach logic that runs in the request flow after any steps in a conditional flow, or in the response flow after any steps in a conditional flow.
I agree that the documentation could call this out more clearly. (If the doc was super clear, then Gemini would give a more accurate answer, instead of something like “Apigee PostclientFlow is used to measure the time interval between the start and end of a response message.” #1, that’s not really sensible as phrased, and #2, computing elapsed times is not the primary use case for PostClientFlow.