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

varnishlog -l parameter to limit output based on the transaction level #3473

Open
ThijsFeryn opened this issue Nov 30, 2020 · 0 comments
Open

Comments

@ThijsFeryn
Copy link
Contributor

The VSL transaction hierarchy illustrates the meaning of transaction levels. These levels can be used within the VSL query syntax.

However, the output cannot be filtered based on the transaction hierarchy.

This issue is a feature request that introduces the -l parameter for varnishlog, varnishtop, and varnishncsa. This parameter allows users to filter output based on transaction levels.

Here's a first example of this syntax:

varnishlog -g request -l 2 -i ReqUrl -q "{2}Timestamp:Resp[2] > 2.0"

This example will look for ESI subrequests that took more than 2 seconds to load. The URL is returned, but instead of returning the URL for all linked transactions, only the level 2 transaction is returned.

In this hypothetical case, the URL of the ESI subrequest would be returned.

The syntax could also be a bit more flexible and allow ranges to be used:

  • varnishlog -g request -l 1-3
  • varnishlog -g request -l 2+
  • varnishlog -g request -l 3-

If session grouping is used, the level 1 transaction refer to the session, and not the request.

This -l parameter could conflict with -c and -b. If this featured has a chance of being implemented, we need to decide if -l has the precedence over -c and -b, or vice-versa.

Thoughts?

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

1 participant