wu-sheng commented on a change in pull request #6120:
URL: https://github.com/apache/skywalking/pull/6120#discussion_r550976362



##########
File path: 
oap-server/analyzer/log-analyzer/src/main/java/org/apache/skywalking/oap/log/analyzer/provider/log/LogAnalyzer.java
##########
@@ -34,14 +37,25 @@
     private final List<LogAnalysisListener> listeners = new ArrayList<>();
 
     public void doAnalysis(LogData logData) {
+        if (StringUtil.isEmpty(logData.getService())) {
+            // If the service name is empty, the log will be ignored.
+            log.debug("The log is ignored because the Service name is empty");
+            return;
+        }
         createListeners();
 
-        notifyListener(logData);
+        LogData.Builder builder = logData.toBuilder();
+        if (builder.getTimestamp() == 0) {
+            // If not set, OAP server would use the received timestamp as 
log's timestamp

Review comment:
       ```suggestion
               // If no timestamp, OAP server would use the received timestamp 
as log's timestamp
   ```




----------------------------------------------------------------
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.

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


Reply via email to