* Quantile values for a Summary are now configurable.
* The default quantiles (DefObjectives) in the prometheus Go client library is
deprecated. This commit removes the reliance on it.
Signed-off-by: Harry Bagdi <harrybagdi@gmail.com>
This test did not fail because the regex was bad, it failed because yaml
parsing failed.
This fixes the yaml which uncovers a panic in initFromYAMLString.
Strings with leading asterisks need to be escaped in YAML.
Add the same examples into the test suite to make sure they do what we
claim they do.
Fixes#102.
* Added `regex` match_type as valid config callout in both individual mappers
and mapper defaults
* Added test coverage for changes
* Updated documentation to reflect usage of `match_type` parameter and
provide example of a raw regex match rule
* Removed legacy mapper config parser
* Removed logic to switch to YAML parsing based on mapping filename
* Removed tests for legacy mapper config
* Remove references to legacy mapper config format from `README.md`
* When a terminating newline is missing from the metric mapping configuration file, the last definition is not parsed at all. After this change the last 'METRIC_DEFINITION' in the file is equivalent to a newline (either between definitions or as the terminating newline).
* Update mapping, if we are reading the last line of the file. Otherwise we will append the mapping and lose the last label. Since we are updating the mapping in two different places a 'updateMapping' function was introduced.
* Added mapper test for config files without a terminating newline.
* Added another test case where multiple definitions are given without a final terminating newline.
* As suggested by @grobie, we should give an error when a terminating newline is missing. Updated tests accordingly.