From bcd553253e0231e74d724a7f1c6fddefceb05cc0 Mon Sep 17 00:00:00 2001 From: Ivan <2103732+codebien@users.noreply.github.com> Date: Wed, 14 Jun 2023 12:37:43 +0200 Subject: [PATCH] output/cloud: Remove the limit for the body's payload --- output/cloud/expv2/metrics_client.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/output/cloud/expv2/metrics_client.go b/output/cloud/expv2/metrics_client.go index fb94ee9e32d..cba234ed002 100644 --- a/output/cloud/expv2/metrics_client.go +++ b/output/cloud/expv2/metrics_client.go @@ -76,17 +76,11 @@ func (mc *metricsClient) push(referenceID string, samples *pbcloud.MetricSet) er return nil } -const payloadSizeLimit = 100 * 1024 // 100 KiB - func newRequestBody(data *pbcloud.MetricSet) ([]byte, error) { b, err := proto.Marshal(data) if err != nil { return nil, fmt.Errorf("encoding metrics as Protobuf write request failed: %w", err) } - if len(b) > payloadSizeLimit { - return nil, fmt.Errorf("the Protobuf message is too large to be handled from the Cloud processor; "+ - "size: %d, limit: 100 KB", len(b)) - } // TODO: use the framing format // https://github.com/google/snappy/blob/main/framing_format.txt // It can be done replacing the encode with