While investigating a potential encoding issue (WF Proxy shows a ? and blocks the metric), I found a potential batching bug in the class
com.wavefront.sdk.common.clients.WavefrontClient
in the method
getBatch(...)
The batch size is being calculated, such as
int numBytes = item.getBytes().length;
Since the WFProxy expects encoding in UTF-8, the client should always be using UTF-8, even for these calculations. I admit that the potential for a functional bug is probably low, but I wanted to log this issue anyway.
So the call should be
int numBytes = item.getBytes(StandardCharsets.UTF_8).length;
Hi,
While investigating a potential encoding issue (WF Proxy shows a ? and blocks the metric), I found a potential batching bug in the class
com.wavefront.sdk.common.clients.WavefrontClient
in the method
getBatch(...)
The batch size is being calculated, such as
int numBytes = item.getBytes().length;
Since the WFProxy expects encoding in UTF-8, the client should always be using UTF-8, even for these calculations. I admit that the potential for a functional bug is probably low, but I wanted to log this issue anyway.
So the call should be
int numBytes = item.getBytes(StandardCharsets.UTF_8).length;