xds-relay icon indicating copy to clipboard operation
xds-relay copied to clipboard

Verbose and succinct cache output

Open jyotimahapatra opened this issue 4 years ago • 3 comments

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 avatar Sep 14 '20 18:09 jyotimahapatra

@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
	}
]

samrabelachew avatar Nov 12 '20 23:11 samrabelachew

How about using query params for the verbose cache option, ex: /cache/<key>?verbose=true

jessicayuen avatar Nov 13 '20 23:11 jessicayuen

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

jessicayuen avatar Nov 13 '20 23:11 jessicayuen