VictoriaMetrics/app/vmagent/remotewrite
Aliaksandr Valialkin b60594a548
app/vmagent/remotewrite: follow-up for e3a756d82869f8c357b072f6e635ebfc7d65dd2c
- Document the fix
- Move the detection of VictoriaMetrics remoteWrite protocol from client.init() to newHTTPClient()
  This simplifies the fix to the following diff:

diff --git a/app/vmagent/remotewrite/client.go b/app/vmagent/remotewrite/client.go
index 099899c19..70b904af4 100644
--- a/app/vmagent/remotewrite/client.go
+++ b/app/vmagent/remotewrite/client.go
@@ -151,10 +151,6 @@ func newHTTPClient(argIdx int, remoteWriteURL, sanitizedURL string, fq *persiste
        }
        c.sendBlock = c.sendBlockHTTP

-       return c
-}
-
-func (c *client) init(argIdx, concurrency int, sanitizedURL string) {
        useVMProto := forceVMProto.GetOptionalArg(argIdx)
        usePromProto := forcePromProto.GetOptionalArg(argIdx)
        if useVMProto && usePromProto {
@@ -173,6 +169,10 @@ func (c *client) init(argIdx, concurrency int, sanitizedURL string) {
        }
        c.useVMProto = useVMProto

+       return c
+}
+
+func (c *client) init(argIdx, concurrency int, sanitizedURL string) {
2023-03-08 01:35:31 -08:00
..
client.go app/vmagent/remotewrite: follow-up for e3a756d82869f8c357b072f6e635ebfc7d65dd2c 2023-03-08 01:35:31 -08:00
pendingseries.go app/vmagent: add -remoteWrite.vmProtoCompressLevel command-line flag for tuning the compression level for VictoriaMetrics remote write protocol 2023-02-27 11:04:11 -08:00
pendingseries_test.go app/vmagent/remotewrite: removed unneeded code in testPushWriteRequest after 57801660ab 2023-02-22 17:50:03 -08:00
pendingseries_timing_test.go app/vmagent/remotewrite: go fmt after 2b55d167d7 2022-09-19 15:14:03 +03:00
relabel.go app/vmagent/remotewrite: improve descriptions for -remoteWrite.relabelConfig and -remoteWrite.urlRelabelConfig 2023-01-03 22:05:39 -08:00
relabel_test.go vmagent: respect -usePromCompatibleNaming if no relabeling is set (#3511) 2022-12-20 14:34:29 -08:00
remotewrite.go app/vmagent: use the provided auth options when checking whether the remote storage supports VictoriaMetrics remote write protocol 2023-02-26 12:19:53 -08:00
statconn.go app/vmagent: properly initialize stdDialer 2022-04-06 14:00:50 +03:00