statsd_exporter/pkg
Matthias Rampke 0c2c1d96f9
Fix panic when parsing invalid lines
The line

```
|h|#consumer:Kafka::SharedConfigurationConsumer,topic:shared_configuration_update,partition:1,consumer_group:tc_rc_us
```

caused a panic because the line parsing _first_ splits by `:` and then failed to
find a `|` to split on.

Check that we get at least two "line parts" (i.e. splits around `|`) when we
expect them, and if not, gracefully reject the line instead of crashing.

Fixes #572.

Signed-off-by: Matthias Rampke <matthias@prometheus.io>
2024-09-15 11:46:57 +00:00
..
address Change casing of error messages 2020-09-06 16:33:18 +05:30
clock hopefully now linux 2020-04-08 15:29:54 -04:00
event cleanup 2021-02-06 23:21:49 -05:00
exporter Add more tests for gauge increment/decrement 2024-01-15 22:44:07 +01:00
level refactor: replace level pkg 2021-09-01 18:55:45 +08:00
line Fix panic when parsing invalid lines 2024-09-15 11:46:57 +00:00
listener add counter for dropped UDP packets. Remove unnecessary and misleading comment 2023-10-23 10:01:52 +03:00
mapper Remove unnecessary nil checks 2024-09-15 09:37:35 +00:00
mappercache Use groupcache for LRU cache 2021-04-28 12:15:19 -04:00
metrics Added license. 2020-04-08 15:30:01 -04:00
registry Allow creation of native histograms 2022-12-06 09:49:24 +01:00
relay Convert line payload debug logs to string 2023-07-10 11:26:39 +02:00
README.md Add deprecation note to pkg directory 2021-10-13 14:40:09 +02:00

The pkg directory is deprecated. Please do not add new packages to this directory. Existing packages will be moved elsewhere eventually.