Before this change Fields() method on a metric parsed from a line with
unescaped quotes could panic. This change makes such line unparseable.
Fixes#3326
main reasons behind this:
- make adding/removing tags cheap
- make adding/removing fields cheap
- make parsing cheaper
- make parse -> decorate -> write out bytes metric flow much faster
Refactor serializer to use byte buffer
in this commit:
- chunks out the http request body to avoid making very large
allocations.
- establishes a limit for the maximum http request body size that the
listener will accept.
- utilizes a pool of byte buffers to reduce GC pressure.
This constitutes a large change in how we will parse different data
formats going forward (for the plugins that support it)
This is working off @henrypfhu's changes.