Metrics that are unserializable will be logged at debug level, but the
rest of the batch will be sent. Unserializable metrics can occur during
normal operation such as if you remove all fields from a metric or the
metric cannot fit within the line size limit.
(cherry picked from commit 29b37e67c2)