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



##########
File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Process.java
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.oap.server.core.source;
+
+import com.google.gson.JsonObject;
+import lombok.Getter;
+import lombok.Setter;
+import org.apache.skywalking.oap.server.core.analysis.IDManager;
+import org.apache.skywalking.oap.server.core.analysis.Layer;
+import 
org.apache.skywalking.oap.server.core.analysis.manual.process.ProcessDetectType;
+
+import static 
org.apache.skywalking.oap.server.core.source.DefaultScopeDefine.PROCESS;
+import static 
org.apache.skywalking.oap.server.core.source.DefaultScopeDefine.PROCESS_CATALOG_NAME;
+
+@ScopeDeclaration(id = PROCESS, name = "Process", catalog = 
PROCESS_CATALOG_NAME)
[email protected](fieldName = "entityId", columnName 
= "entity_id", isID = true, type = String.class)
+public class Process extends Source {
+    private volatile String entityId;
+
+    @Override
+    public int scope() {
+        return PROCESS;
+    }
+
+    @Override
+    public String getEntityId() {
+        if (entityId == null) {
+            entityId = IDManager.ProcessID.buildId(instanceId, name);
+        }
+        return entityId;
+    }
+
+    @Getter
+    @ScopeDefaultColumn.DefinedByField(columnName = "instance_id")

Review comment:
       Same as https://github.com/apache/skywalking/pull/8617/files#r818356930, 
this source is not designed for OAL analysis. So, don't need to set up 
`ScopeDefaultColumn.DefinedByField`, because you have and only will have a 
manual dispatcher, which is not sensitive about these annotations.




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