berthubert / simplomon

Very simple monitoring system with a single configuration file
MIT License
97 stars 12 forks source link

Extend Prometheus grammar to cover more of the exposition format #39

Open wandernauta opened 2 months ago

wandernauta commented 2 months ago

This extends the Prometheus grammar so that it can correctly parse the example from the documentation, and adds a number of test cases.

The grammar now...

Some names in the PEG grammar are aligned with the EBNF grammar in the docs.

Finally, entirely empty (no lines at all) responses are now allowed, to be compatible with upstream Prometheus behavior.