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

Allow filtering on missing variables #140

Open
RealOrangeOne opened this issue Jun 16, 2021 · 1 comment
Open

Allow filtering on missing variables #140

RealOrangeOne opened this issue Jun 16, 2021 · 1 comment

Comments

@RealOrangeOne
Copy link

Especially useful when parsing lines of different structures with logfmt, it's useful to say something like "only use lines where this variable exists", or something.

This could be something where missing variables are falsy, so using where would work as normal. Or perhaps a different operator, or a new filter entirely (eg has). For an intuitive feel, making them falsey, or never equal to anything in a where would be really nice, although may not be backwards compatible.

Currently I add a contains before logfmt, which feels like a bit of a hack.

Example

type=event value=50
path=/ response_time=50ms

Using | where value > 50 would result in an error for the second line. Whereas being able to do | has value before it would filter out any of those.

@rcoh
Copy link
Owner

rcoh commented Jun 16, 2021 via email

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

2 participants