Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose and succinct cache output #144

Open
jyotimahapatra opened this issue Sep 14, 2020 · 3 comments
Open

Verbose and succinct cache output #144

jyotimahapatra opened this issue Sep 14, 2020 · 3 comments

Comments

@jyotimahapatra
Copy link
Contributor

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.

@samrabelachew
Copy link
Contributor

samrabelachew commented Nov 12, 2020

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

@jessicayuen
Copy link
Member

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

@jessicayuen
Copy link
Member

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 pushed a commit that referenced this issue Jan 6, 2021
Per #144, made cache handler have a verbose/succinct output. Default is to run succinctly. If URL contains parameter `verbose=true`, it will run the original verbose method, including all request metadata. Otherwise, it will return the number of requests in its place.

Signed-off-by: Samra Belachew <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants