With each request, Portkey sends back Portkey-specific headers that can help you identify the state of specific Portkey features you are using.
We send the following 4 response headers:
Returns a unique trace id for each response.
In case the user has already sent a trace id with
x-portkey-trace-id in their request body, then that is used here instead of generating a new id.
Returns the number of retry attempts made for the call. Request made for the first time is not counted, only the attempts are counted. So, if the value is 3, that means that a total of 4 (1+3) calls were made.
Returns the cache status for the call.
HIT (simple cache hit)
SEMANTIC HIT (semantic cache hit)
MISS (simple cache header was sent in the request, but returned a miss)
SEMANTIC MISS (semantic cache header was sent in the request, but returned a miss)
DISABLED (no cache header sent)
REFRESH (cache force refresh was true in the request header)
Returns the nested target index (as jsonpath) for the Config id used while making the call.