yu199195 commented on a change in pull request #8608:
URL: https://github.com/apache/shardingsphere/pull/8608#discussion_r542138225
##########
File path:
shardingsphere-agent/shardingsphere-agent-distribution/src/main/resources/conf/agent.yaml
##########
@@ -21,3 +21,11 @@ metrics:
host: localhost
port: 8090
+tracing:
+ agentHost: localhost
+ agentPort: 5775
+ extra:
+ JAEGER_SAMPLER_TYPE: const
+ JAEGER_SAMPLER_PARAM: 1
+ JAEGER_REPORTER_LOG_SPANS: true
+ JAEGER_REPORTER_FLUSH_INTERVAL: 1
Review comment:
have empty line in the end
##########
File path:
shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracers/shardingsphere-agent-tracer-jaeger/src/main/java/org/apache/shardingsphere/agent/plugin/trace/advice/CommandExecutorTaskAdvice.java
##########
@@ -16,31 +16,44 @@
*
*/
-package org.apache.shardingsphere.agent.plugin.trace;
+package org.apache.shardingsphere.agent.plugin.trace.advice;
+import io.opentracing.Scope;
+import io.opentracing.tag.Tags;
+import io.opentracing.util.GlobalTracer;
import org.apache.shardingsphere.agent.core.plugin.advice.MethodAroundAdvice;
import
org.apache.shardingsphere.agent.core.plugin.advice.MethodInvocationResult;
import org.apache.shardingsphere.agent.core.plugin.advice.TargetObject;
+import org.apache.shardingsphere.agent.plugin.trace.ShardingErrorSpan;
+import org.apache.shardingsphere.agent.plugin.trace.constant.ShardingTags;
+import org.apache.shardingsphere.infra.executor.kernel.model.ExecutorDataMap;
import java.lang.reflect.Method;
/**
- * Advice sample.
+ * Command executor task advice.
*/
-public class SampleAdvice implements MethodAroundAdvice {
-
+public class CommandExecutorTaskAdvice implements MethodAroundAdvice {
+ private static final String OPERATION_NAME = "/" +
ShardingTags.COMPONENT_NAME + "/rootInvoke/";
Review comment:
have empyt lineļ¼ maybe use string.joins()
##########
File path:
shardingsphere-agent/shardingsphere-agent-core/src/main/java/org/apache/shardingsphere/agent/core/plugin/AgentPluginLoader.java
##########
@@ -262,7 +268,7 @@ public PluginAdviceDefinition loadPluginAdviceDefine(final
TypeDescription typeD
* To get or create instance of the advice class. Create new one and
caching when it is not exist.
*
* @param classNameOfAdvice class name of advice
- * @param <T> advice type
+ * @param <T> advice type
Review comment:
remove this empty line
##########
File path:
shardingsphere-agent/shardingsphere-agent-plugins/shardingsphere-agent-plugin-tracers/shardingsphere-agent-tracer-jaeger/pom.xml
##########
@@ -28,10 +28,38 @@
</parent>
<packaging>jar</packaging>
- <artifactId>shardingsphere-agent-tracer-sample</artifactId>
+ <artifactId>shardingsphere-agent-tracer-jaeger</artifactId>
<properties>
-
<entrypoint.class>org.apache.shardingsphere.agent.plugin.trace.SamplePluginDefinition</entrypoint.class>
+
<entrypoint.class>org.apache.shardingsphere.agent.plugin.trace.JaegerPluginDefinition</entrypoint.class>
</properties>
+ <dependencies>
+ <dependency>
+ <groupId>io.jaegertracing</groupId>
+ <artifactId>jaeger-client</artifactId>
+ <version>0.31.0</version>
Review comment:
version maybe common define
----------------------------------------------------------------
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]