VM attempts to parse IP addr as float #590
Labels
bug
This is considered a bug and shall get fixed
mtail-Language/VM
Issues related to the mtail language, compiler, or VM
Summary
Certain regex patterns when used to capture an IP address are causing mtail to try and parse IP addresses as a float:
Runtime error: strconv.ParseFloat: parsing "10.0.0.1": invalid syntax
I have included an mtail program below that can recreate the problem along with a similar program that does not cause the problem. Curiously this seems to only occur when creating a histogram metric.
Steps to reproduce:
mtail --one_shot --progs broken.mtail --logs example.log -logtostderr
Runtime error
occursmtail --one_shot --progs working.mtail --logs example.log -logtostderr
mtail --version
AST Type Dump
I have attempted to get a type dump by running:
mtail --one_shot --progs broken.mtail --logs example.log --dump_ast_types --log_dir output
mtail --one_shot --compile_only --progs broken.mtail --logs example.log --dump_ast_types --log_dir output
Neither has resulted in a log beyond:
Let me know if I am running this command incorrectly and I can submit the appropriate log.
Thanks!
example.log
broken.mtail
working.mtail
The text was updated successfully, but these errors were encountered: