-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
backendOAP backend related.OAP backend related.bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!high priorityHigh priority issue, blocking next release.High priority issue, blocking next release.
Milestone
Description
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
@Override
protected LogData parseConsumerRecord(ConsumerRecord<String, Bytes> record) throws IOException {
LogData.Builder logDataBuilder = LogData.newBuilder();
ProtoBufJsonUtils.fromJSON(new String(record.value().get(), StandardCharsets.UTF_8), logDataBuilder);
return logDataBuilder.build();
}This should be the correct way to decode byte[] from Kafka
What you expected to happen
Some one reported this through QQ discussion group in CN.
The original reported agree to submit this fix after he/she tested, I opened this issue for tracking the progress.
How to reproduce
The current code only supported ascii chars. Chinese chars or others out of ascii would be decoded incorrectly.
Such as "body":{"text":{"text":"\"test\""}} -> "body":{"text":{"text":"\x5C"test\x5C""}}
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendOAP backend related.OAP backend related.bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!high priorityHigh priority issue, blocking next release.High priority issue, blocking next release.