Are you setting the right headers (esp. "Content-Encoding: snappy") so that the remote end knows the request is snappy-compressed? Like these here:
https://github.com/prometheus/prometheus/blob/cd12f0873c3eb2031f7ba9b2e169449aa1012e3f/storage/remote/client.go#L84-L87 Because your error is a protobuf decoding error referring to a wire type which protobuf itself does not define (max wire type is 5, see https://developers.google.com/protocol-buffers/docs/encoding#structure), maybe the receiving end is trying to interpret the request as protobuf without decompressing it first? On Sun, Apr 19, 2020 at 3:52 PM Qiang Ma <[email protected]> wrote: > Hi, All, > > I am trying to write a Java client to push metrics through remote_write > (as I want to use PromQL to narrow down number of metrics). > > The receiving end is an InfluxDB and it is taking data from prometheus > native "remote_write" with no problem. > > But when I use the Java client to post the payload (encoded with > org.xerial.snappy.Snappy) and the client got this error: > {"error":"proto: illegal wireType 6"} > > There are not much I could find how to trouble shoot to understand what's > the problem... hoping there is someone in this group can lend me some tips! > Thanks in advance! > > Regards, > Qiang > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/b3c9aaab-d85b-4b81-a922-2c2032916aac%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/b3c9aaab-d85b-4b81-a922-2c2032916aac%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CA%2BT6YozA11_ga99njxPj2gi4vxok73zb-UP%3DLx6k4_eephkY2A%40mail.gmail.com.

