Force UTF-8 encoding in `JsonLogHandler` of `kafka-fetcher-plugin`. (#9927)
This commit is contained in:
parent
9139a8f0cb
commit
a386853bc9
|
|
@ -103,6 +103,7 @@
|
|||
* Fix `ClassCastException` in `LoggingConfigWatcher`.
|
||||
* Support span attached event concept in Zipkin and SkyWalking trace query.
|
||||
* Support span attached events on Zipkin lens UI.
|
||||
* Force UTF-8 encoding in `JsonLogHandler` of `kafka-fetcher-plugin`.
|
||||
|
||||
#### UI
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package org.apache.skywalking.oap.server.analyzer.agent.kafka.provider.handler;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||
import org.apache.kafka.common.utils.Bytes;
|
||||
|
|
@ -50,7 +51,7 @@ public class JsonLogHandler extends LogHandler {
|
|||
@Override
|
||||
protected LogData parseConsumerRecord(ConsumerRecord<String, Bytes> record) throws IOException {
|
||||
LogData.Builder logDataBuilder = LogData.newBuilder();
|
||||
ProtoBufJsonUtils.fromJSON(record.value().toString(), logDataBuilder);
|
||||
ProtoBufJsonUtils.fromJSON(new String(record.value().get(), StandardCharsets.UTF_8), logDataBuilder);
|
||||
return logDataBuilder.build();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue