mirror of
https://github.com/wahyd4/telegraf.git
synced 2026-08-09 04:36:05 +10:00
Compress again too
This commit is contained in:
@@ -220,6 +220,12 @@ func (c *httpClient) writeBatch(ctx context.Context, bucket string, metrics []te
|
||||
|
||||
req.GetBody = func() (io.ReadCloser, error) {
|
||||
body := influx.NewReader(metrics, c.serializer)
|
||||
if c.ContentEncoding == "gzip" {
|
||||
body, err = internal.CompressWithGzip(body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
rc := ioutil.NopCloser(body)
|
||||
return rc, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user