Skip to content

if expression problem, how best to solve ? #10699

Answered by StephenWakely
StefanSa asked this question in Q&A
Discussion options

You must be logged in to vote

There is a definite bug here. I have raised #10746 to track the issue. Vector should not boot at all with the script as it stands since it can't guarantee that observer.egress.zone, .observer.ingress.zone.

It would be nice if the if predicate:

if (is_string(.observer.egress.zone) && is_string(.observer.ingress.zone)) {

was sufficient to inform VRL that these values need to be strings within the if block. However, VRL is not quite advanced enough yet.

Now, I'm not convinced that this is the only bug that you have discovered - because that if should have been sufficient to prevent VRL from trying to run the match_all with parameters that are not strings. I cannot reproduce the error when t…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@StefanSa
Comment options

@spencergilbert
Comment options

@StefanSa
Comment options

@StefanSa
Comment options

Comment options

You must be logged in to vote
4 replies
@StefanSa
Comment options

@StephenWakely
Comment options

@StefanSa
Comment options

@StefanSa
Comment options

Answer selected by StefanSa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants