spotify / ffwd

a flexible metric forwarding agent
https://spotify.github.io/ffwd/
Apache License 2.0
79 stars 33 forks source link

Resize pubsub batches when they are above 10MB limit #246

Closed lmuhlha closed 3 years ago

lmuhlha commented 3 years ago

When a batch is sent that is over the pubsub limit of 10MB we get ERROR com.spotify.ffwd.pubsub[output:2] - Failed sending metrics io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request payload size exceeds the limit: 10485760 bytes. Which gets retried and causes a backup of metrics.

This will check the size of metrics being sent in bytes and reduce the size appropriately before sending to pubsub.