You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/03/26 10:20:01 UTC
[GitHub] [skywalking] sonatype-lift[bot] commented on a change in pull request #8747: Enhance endpoint dependency analysis to support cross threads cases.
sonatype-lift[bot] commented on a change in pull request #8747:
URL: https://github.com/apache/skywalking/pull/8747#discussion_r835747683
##########
File path: oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/EndpointSourceBuilder.java
##########
@@ -0,0 +1,113 @@
+/*
+ * 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.analyzer.provider.trace.parser.listener;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+import org.apache.skywalking.apm.network.common.v3.KeyStringValuePair;
+import org.apache.skywalking.oap.server.core.analysis.Layer;
+import org.apache.skywalking.oap.server.core.config.NamingControl;
+import org.apache.skywalking.oap.server.core.source.DetectPoint;
+import org.apache.skywalking.oap.server.core.source.Endpoint;
+import org.apache.skywalking.oap.server.core.source.RequestType;
+
+/**
+ * Endpoint traffic source builder. Endpoint represents an entrance to expose logic.
+ * Typically, it could be HTTP URI, gRPC service name, etc. for RPC, or a local method is required to be analyzed.
+ *
+ * @since 9.0.0
+ */
+@RequiredArgsConstructor
+class EndpointSourceBuilder {
+ protected final NamingControl namingControl;
+
+ @Getter
+ @Setter
+ protected long timeBucket;
+ @Getter
+ @Setter
+ protected String destServiceName;
+ @Getter
+ @Setter
+ protected Layer destLayer;
+ @Getter
+ @Setter
+ protected String destServiceInstanceName;
+ @Getter
+ @Setter
+ protected String destEndpointName;
+ @Getter
+ @Setter
+ protected int latency;
+ @Getter
Review comment:
*SameNameButDifferent:* The name `@Getter` refers to [java.lang.SuppressWarnings, lombok.Generated, java.lang.String, org.apache.skywalking.oap.server.core.analysis.Layer, org.apache.skywalking.oap.server.core.source.RequestType, org.apache.skywalking.oap.server.core.source.DetectPoint, java.util.List, java.util.Map] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity. [(details)](https://errorprone.info/bugpattern/SameNameButDifferent)
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)
##########
File path: oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/EndpointSourceBuilder.java
##########
@@ -0,0 +1,113 @@
+/*
+ * 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.analyzer.provider.trace.parser.listener;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+import org.apache.skywalking.apm.network.common.v3.KeyStringValuePair;
+import org.apache.skywalking.oap.server.core.analysis.Layer;
+import org.apache.skywalking.oap.server.core.config.NamingControl;
+import org.apache.skywalking.oap.server.core.source.DetectPoint;
+import org.apache.skywalking.oap.server.core.source.Endpoint;
+import org.apache.skywalking.oap.server.core.source.RequestType;
+
+/**
+ * Endpoint traffic source builder. Endpoint represents an entrance to expose logic.
+ * Typically, it could be HTTP URI, gRPC service name, etc. for RPC, or a local method is required to be analyzed.
+ *
+ * @since 9.0.0
+ */
+@RequiredArgsConstructor
Review comment:
*SameNameButDifferent:* The name `@RequiredArgsConstructor` refers to [java.lang.SuppressWarnings, lombok.Generated, org.apache.skywalking.oap.server.core.config.NamingControl] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity. [(details)](https://errorprone.info/bugpattern/SameNameButDifferent)
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)
##########
File path: oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/RPCTrafficSourceBuilder.java
##########
@@ -54,68 +48,39 @@
@Setter
private String sourceServiceInstanceName;
/**
+ * Same as {@link #sourceEndpointOwnerServiceName}
* Source endpoint could be not owned by {@link #sourceServiceName}, such as in the MQ or un-instrumented proxy
- * cases. This service always comes from the span.ref, so it is always a normal service.
+ * cases. This service always comes from the span.ref, so it is always a general service.
+ *
+ * @since 9.0.0
*/
@Getter
@Setter
- private String sourceEndpointOwnerServiceName;
- @Getter
- @Setter
- private String sourceEndpointName;
- @Getter
- @Setter
- private String destServiceName;
- @Getter
- @Setter
- private Layer destLayer;
+ private Layer sourceEndpointOwnerServiceLayer;
+ /**
+ * Source endpoint could be not owned by {@link #sourceServiceName}, such as in the MQ or un-instrumented proxy
+ * cases. This service always comes from the span.ref, so it is always a general service.
+ */
@Getter
@Setter
- private String destServiceInstanceName;
+ private String sourceEndpointOwnerServiceName;
@Getter
@Setter
- private String destEndpointName;
+ private String sourceEndpointName;
@Getter
@Setter
Review comment:
*SameNameButDifferent:* The name `@Setter` refers to [java.lang.SuppressWarnings, lombok.Generated, java.lang.String, org.apache.skywalking.oap.server.core.analysis.Layer] within this file. It may be confusing to have the same name refer to multiple types. Consider qualifying them for clarity. [(details)](https://errorprone.info/bugpattern/SameNameButDifferent)
(at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`)
--
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: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org