xds-relay
xds-relay copied to clipboard
Verbose and succinct cache output
While debugging caches i realized the cache output is too big because it includes the DiscoveryRequest. This was hard to work with. We should make a way to show verbose/non verbose logs on cache endpoint.
@jyotimahapatra @jessicayuen, what do you think of this? Verbose/succinct setup: Split cache handler into two:
When /verbose_cache/key*
flag is used, we run the existing cache flow to output the entire cache.
When /cache/key*
flag is excluded, the cache output becomes a summary as follows:
Cache: [
{
"aggkey": string,
"resp_typeURL”: string,
"resp_version”: int,
"num_requests: int,
"exp_time”: string
}
]
How about using query params for the verbose cache option, ex: /cache/<key>?verbose=true
The succinct cache output looks good, except I would return the full response rather than just the typeURL/version. What are your thoughts? cc @jyotimahapatra