zbw911 commented on code in PR #128:
URL: 
https://github.com/apache/skywalking-satellite/pull/128#discussion_r1137375878


##########
plugins/forwarder/kafka/nativelog/forwarder.go:
##########
@@ -80,10 +82,16 @@ func (f *Forwarder) Forward(batch event.BatchEvents) error {
                if !ok {
                        continue
                }
-               for _, l := range data.LogList.Logs {
+               for _, logData := range data.LogList.Logs {
+                       logdata := &v3.LogData{}
+                       err := proto.Unmarshal(logData, logdata)

Review Comment:
   Yes, there is indeed some impact on performance, although I haven't delved 
deeply into how much. In a previous version, I generated entities with only a 
few necessary fields for deserialization through a proto file. However, I found 
that I needed to maintain another entity. As a result, I deleted the generated 
files. Another ultimate solution, as you suggested, is to unpack the binary 
stream and obtain the corresponding fields based on the delimiter. We'll leave 
this as an optimization point for now, as it is sufficient for our current 
needs. However, as more applications are integrated later, we may optimize 
according to these solutions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to