Do not snappy encode if record is too large (#8790)
Do not snappy encode if record is too large (#8790)

Snappy cannot encode records larger than ~3.7 GB and will panic if an
encoding is attempted. Check to make sure that the record is smaller
than this before encoding.

In the future, we could improve this behavior to still compress large
records (or break them up into smaller records), but this avoids the
panic for users with very large single scrape targets.

Signed-off-by: Chris Marchbanks <0ad0b538c51a24737b83a297dff91636ee98d89e@gmail.com>
keegancsmith/prometheus,prometheus/prometheus,alileza/prometheus,keegancsmith/prometheus,keegancsmith/prometheus,keegancsmith/prometheus,prometheus/prometheus,GoogleCloudPlatform/prometheus,alileza/prometheus,GoogleCloudPlatform/prometheus,prometheus/prometheus,keegancsmith/prometheus,GoogleCloudPlatform/prometheus,GoogleCloudPlatform/prometheus,GoogleCloudPlatform/prometheus,alileza/prometheus,alileza/prometheus,prometheus/prometheus,prometheus/prometheus,alileza/prometheus