You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/09/09 07:07:17 UTC
[skywalking] branch master updated: exception-ignore-plugin (#5426)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 29de696 exception-ignore-plugin (#5426)
29de696 is described below
commit 29de696c42901206848575e20dc1de2ca4943e64
Author: Evan <31...@users.noreply.github.com>
AuthorDate: Wed Sep 9 15:07:01 2020 +0800
exception-ignore-plugin (#5426)
---
.github/workflows/plugins-test.0.yaml | 2 +
.../apm/toolkit/trace/IgnoredException.java | 35 +++++
.../skywalking/apm/agent/core/conf/Config.java | 16 ++-
.../AnnotationMatchExceptionCheckStrategy.java | 36 +++++
.../core/context/status/ExceptionCheckContext.java | 50 +++++++
.../context/status/ExceptionCheckStrategy.java | 27 ++++
.../HierarchyMatchExceptionCheckStrategy.java | 46 +++++++
.../context/status/OffExceptionCheckStrategy.java | 29 ++++
.../core/context/status/StatusCheckService.java | 69 ++++++++++
.../agent/core/context/status/StatusChecker.java | 90 +++++++++++++
.../core/context/trace/AbstractTracingSpan.java | 5 +
...ache.skywalking.apm.agent.core.boot.BootService | 3 +-
.../apm/agent/core/boot/ServiceManagerTest.java | 2 +-
.../apm/agent/core/context/ContextManagerTest.java | 2 -
.../context/status/ExceptionCheckStrategyTest.java | 70 ++++++++++
.../status/StatusCheckServiceCheckTest.java | 83 ++++++++++++
.../core/context/status/StatusCheckerTest.java | 77 +++++++++++
.../status/TestAnnotationMatchException.java | 56 ++++++++
.../status/TestHierarchyMatchException.java | 44 ++++++
.../context/status/TestNamedMatchException.java | 44 ++++++
.../activemq/ActiveMQConsumerInterceptor.java | 2 +-
.../activemq/ActiveMQProducerInterceptor.java | 2 +-
.../armeria/Armeria084ClientInterceptor.java | 2 +-
.../armeria/Armeria084ServerInterceptor.java | 2 +-
.../armeria/Armeria085ServerInterceptor.java | 2 +-
.../plugin/armeria/ArmeriaClientInterceptor.java | 2 +-
.../plugin/avro/AbstractRequestInterceptor.java | 2 +-
.../apm/plugin/avro/ResponderInterceptor.java | 2 +-
.../apm/plugin/baidu/brpc/ClientInterceptor.java | 1 -
.../apm/plugin/baidu/brpc/ServerInterceptor.java | 2 -
.../apm/plugin/canal/CanalInterceptor.java | 2 +-
.../java/driver/v3/ClusterConnectInterceptor.java | 1 -
...sultSetFutureGetUninterruptiblyInterceptor.java | 1 -
...AndExecuteAsyncWithStatementArgInterceptor.java | 1 -
.../apm/plugin/asf/dubbo/DubboInterceptor.java | 1 -
.../apm/plugin/dubbo/DubboInterceptor.java | 1 -
.../plugin/ehcache/v2/EhcacheLockInterceptor.java | 2 +-
.../ehcache/v2/EhcacheOperateAllInterceptor.java | 2 +-
.../v2/EhcacheOperateElementInterceptor.java | 2 +-
.../v2/EhcacheOperateObjectInterceptor.java | 2 +-
.../apm/plugin/esjob/JobExecutorInterceptor.java | 2 +-
.../elasticjob/ElasticJobExecutorInterceptor.java | 2 +-
.../v5/PlainListenableActionFutureInterceptor.java | 2 +-
.../v5/TransportActionNodeProxyInterceptor.java | 2 +-
...terActionFutureActionGetMethodsInterceptor.java | 2 +-
...ClusterClientGetSettingsMethodsInterceptor.java | 6 +-
.../ClusterClientHealthMethodsInterceptor.java | 6 +-
...ClusterClientPutSettingsMethodsInterceptor.java | 8 +-
.../IndicesClientCreateMethodsInterceptor.java | 8 +-
.../IndicesClientDeleteMethodsInterceptor.java | 6 +-
.../RestHighLevelClientGetMethodsInterceptor.java | 8 +-
...RestHighLevelClientIndexMethodsInterceptor.java | 8 +-
...estHighLevelClientSearchMethodsInterceptor.java | 8 +-
...estHighLevelClientUpdateMethodsInterceptor.java | 8 +-
...rtActionNodeProxyExecuteMethodsInterceptor.java | 2 +-
.../http/v9/DefaultHttpClientInterceptor.java | 1 -
.../ClientDestTracingFilterInterceptor.java | 2 +-
.../finagle/ClientTracingFilterInterceptor.java | 3 +-
.../finagle/ServerTracingFilterInterceptor.java | 3 +-
.../apm/plugin/graphql/v12/GraphqlInterceptor.java | 1 -
.../apm/plugin/graphql/v8/GraphqlInterceptor.java | 1 -
.../apm/plugin/graphql/v9/GraphqlInterceptor.java | 1 -
.../grpc/v1/client/BlockingCallInterceptor.java | 2 +-
.../plugin/grpc/v1/client/TracingClientCall.java | 14 +-
.../plugin/grpc/v1/server/TracingServerCall.java | 10 +-
.../grpc/v1/server/TracingServerCallListener.java | 6 +-
.../apm/plugin/hbase/HTableInterceptor.java | 1 -
.../v4/HttpClientExecuteInterceptor.java | 1 -
.../v4/wrapper/FutureCallbackWrapper.java | 2 +-
.../wrapper/HttpAsyncResponseConsumerWrapper.java | 2 +-
.../v3/HttpClientExecuteInterceptor.java | 2 +-
.../v1/HystrixCommandGetFallbackInterceptor.java | 2 +-
.../hystrix/v1/HystrixCommandRunInterceptor.java | 2 +-
.../interceptor/InfluxDBMethodInterceptor.java | 2 +-
.../jdbc/ConnectionServiceMethodInterceptor.java | 2 +-
.../jdbc/trace/CallableStatementTracing.java | 1 -
.../jdbc/trace/PreparedStatementTracing.java | 1 -
.../apm/plugin/jdbc/trace/StatementTracing.java | 1 -
.../apm/plugin/jdbc/ConnectionTracing.java | 1 -
.../plugin/jedis/v2/JedisMethodInterceptor.java | 1 -
.../v90/client/SyncHttpRequestSendInterceptor.java | 2 +-
.../v9/client/SyncHttpRequestSendInterceptor.java | 2 +-
.../plugin/jetty/v9/server/HandleInterceptor.java | 2 +-
.../apm/plugin/kafka/define/InterceptorMethod.java | 2 +-
.../plugin/kafka/CallbackAdapterInterceptor.java | 4 +-
.../apm/plugin/kafka/CallbackInterceptor.java | 4 +-
.../apm/plugin/kafka/KafkaConsumerInterceptor.java | 2 +-
.../plugin/kafka/SubscribeMethodInterceptor.java | 2 +-
.../lettuce/v5/AsyncCommandMethodInterceptor.java | 2 +-
.../lettuce/v5/RedisChannelWriterInterceptor.java | 1 -
.../apm/plugin/lettuce/v5/SWBiConsumer.java | 2 +-
.../apm/plugin/lettuce/v5/SWConsumer.java | 2 +-
.../plugin/light4j/HandleRequestInterceptor.java | 2 +-
...PreparedStatementExecuteMethodsInterceptor.java | 2 +-
.../v2/StatementExecuteMethodsInterceptor.java | 2 +-
.../v2/MongoDBCollectionMethodInterceptor.java | 1 -
.../v3/interceptor/v30/MongoDBInterceptor.java | 1 -
.../v37/MongoDBOperationExecutorInterceptor.java | 1 -
.../apm/plugin/motan/MotanConsumerInterceptor.java | 2 -
.../apm/plugin/motan/MotanProviderInterceptor.java | 2 -
...PreparedStatementExecuteMethodsInterceptor.java | 2 +-
.../mysql/StatementExecuteMethodsInterceptor.java | 2 +-
.../NettySocketIOConnectionInterceptor.java | 2 +-
.../socketio/NettySocketIOOnEventInterceptor.java | 2 +-
.../socketio/NettySocketIORoomInterceptor.java | 2 +-
.../nutz/http/sync/SenderSendInterceptor.java | 2 +-
.../plugin/nutz/mvc/ActionMethodInterceptor.java | 2 +-
.../apm/plugin/okhttp/v3/EnqueueInterceptor.java | 2 +-
.../apm/plugin/okhttp/v3/OnFailureInterceptor.java | 4 +-
.../plugin/okhttp/v3/OnResponseInterceptor.java | 2 +-
.../apm/plugin/okhttp/v3/RealCallInterceptor.java | 1 -
.../plugin/play/v2x/HttpFiltersInterceptor.java | 2 +-
.../apm/plugin/play/v2x/TracingFilter.java | 2 +-
...PreparedStatementExecuteMethodsInterceptor.java | 2 +-
.../StatementExecuteMethodsInterceptor.java | 2 +-
.../plugin/pulsar/PulsarConsumerInterceptor.java | 2 +-
.../plugin/pulsar/PulsarProducerInterceptor.java | 2 +-
.../apm/plugin/pulsar/SendCallbackInterceptor.java | 4 +-
.../apm/plugin/quasar/FiberInterceptor.java | 1 -
.../rabbitmq/RabbitMQConsumerInterceptor.java | 2 +-
.../rabbitmq/RabbitMQProducerInterceptor.java | 2 +-
.../v3/RedisConnectionMethodInterceptor.java | 1 -
.../SynchronousDispatcherExceptionInterceptor.java | 4 +-
.../server/SynchronousDispatcherInterceptor.java | 2 +-
.../v3/AbstractMessageConsumeInterceptor.java | 2 +-
.../plugin/rocketMQ/v3/MessageSendInterceptor.java | 2 +-
.../plugin/rocketMQ/v3/OnExceptionInterceptor.java | 2 +-
.../plugin/rocketMQ/v3/OnSuccessInterceptor.java | 2 +-
.../v4/AbstractMessageConsumeInterceptor.java | 2 +-
.../plugin/rocketMQ/v4/MessageSendInterceptor.java | 2 +-
.../plugin/rocketMQ/v4/OnExceptionInterceptor.java | 2 +-
.../plugin/rocketMQ/v4/OnSuccessInterceptor.java | 2 +-
.../ProducerOperationHandlerInterceptor.java | 1 -
.../TransportClientHandlerInterceptor.java | 1 -
.../v1/ProducerOperationHandlerInterceptor.java | 1 -
.../v1/TransportClientHandlerInterceptor.java | 1 -
.../plugin/sjdbc/define/ExecuteInterceptor.java | 2 +-
.../plugin/shardingsphere/ExecuteInterceptor.java | 2 +-
.../shardingsphere/JDBCRootInvokeInterceptor.java | 2 +-
.../plugin/shardingsphere/ParseInterceptor.java | 2 +-
.../shardingsphere/ProxyRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v40/ExecuteInterceptor.java | 2 +-
.../v40/JDBCRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v40/ParseInterceptor.java | 2 +-
.../v40/ProxyRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v41/ExecuteInterceptor.java | 2 +-
.../v41/JDBCRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v41/ParseInterceptor.java | 2 +-
.../v41/ProxyRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v4rc3/ExecuteInterceptor.java | 2 +-
.../v4rc3/JDBCRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v4rc3/ParseInterceptor.java | 2 +-
.../v4rc3/ProxyRootInvokeInterceptor.java | 2 +-
.../shardingsphere/v4/ExecuteInterceptor.java | 2 +-
.../v4/JDBCRootInvokeInterceptor.java | 2 +-
.../plugin/shardingsphere/v4/ParseInterceptor.java | 2 +-
.../v4/ProxyRootInvokeInterceptor.java | 2 +-
.../plugin/sofarpc/SofaRpcConsumerInterceptor.java | 1 -
.../plugin/sofarpc/SofaRpcProviderInterceptor.java | 1 -
.../apm/plugin/solrj/SolrClientInterceptor.java | 2 +-
.../apm/plugin/solrj/SolrConnectorInterceptor.java | 2 +-
.../apm/plugin/spring/async/SWCallable.java | 2 +-
.../concurrent/FailureCallbackInterceptor.java | 5 +-
.../concurrent/SuccessCallbackInterceptor.java | 2 +-
.../interceptor/AbstractMethodInterceptor.java | 2 +-
.../resttemplate/async/FutureGetInterceptor.java | 2 +-
.../resttemplate/async/RestExecuteInterceptor.java | 2 +-
.../resttemplate/sync/RestExecuteInterceptor.java | 2 +-
.../resttemplate/sync/RestResponseInterceptor.java | 2 +-
.../scheduled/ScheduledMethodInterceptor.java | 2 +-
.../v2/MemcachedMethodInterceptor.java | 1 -
.../apm/plugin/struts2/Struts2Interceptor.java | 2 +-
.../tomcat78x/TomcatExceptionInterceptor.java | 2 +-
.../plugin/tomcat78x/TomcatInvokeInterceptor.java | 1 -
.../undertow/v2x/ListenerConfigInterceptor.java | 2 +-
.../undertow/v2x/RootHandlerInterceptor.java | 2 +-
.../undertow/v2x/RoutingHandlerInterceptor.java | 2 +-
.../undertow/v2x/handler/TracingHandler.java | 2 +-
.../ClusteredEventBusSendRemoteInterceptor.java | 2 +-
.../EventBusImplDeliverToHandlerInterceptor.java | 2 +-
.../vertx3/HandlerRegistrationInterceptor.java | 2 +-
...lientRequestImplHandleExceptionInterceptor.java | 4 +-
...ClientRequestImplHandleResponseInterceptor.java | 2 +-
.../vertx3/HttpClientRequestImplInterceptor.java | 2 +-
...tpContextHandleDispatchResponseInterceptor.java | 2 +-
.../vertx3/HttpContextSendRequestInterceptor.java | 2 +-
...rverResponseImplHandleExceptionInterceptor.java | 4 +-
.../vertx3/HttpServerResponseImplInterceptor.java | 2 +-
.../plugin/vertx3/RouteImplHandlerInterceptor.java | 2 +-
.../apm/plugin/vertx3/RouteStateInterceptor.java | 2 +-
.../ServerConnectionHandleMessageInterceptor.java | 2 +-
.../xmemcached/v2/XMemcachedMethodInterceptor.java | 1 -
.../trace/ActiveSpanErrorThrowableInteceptor.java | 1 -
.../trace/CallableOrRunnableInvokeInterceptor.java | 2 +-
.../IgnoredExceptionAnnotationActivation.java | 65 +++++++++
.../IgnoredExceptionConstructInterceptor.java} | 31 ++---
.../trace/TagAnnotationMethodInterceptor.java | 2 +-
.../trace/TraceAnnotationMethodInterceptor.java | 2 +-
.../src/main/resources/skywalking-plugin.def | 3 +-
.../jdk/http/HttpClientParseHttpInterceptor.java | 2 +-
.../http/HttpClientWriteRequestInterceptor.java | 2 +-
.../jdk/threading/ThreadingMethodInterceptor.java | 2 +-
apm-sniffer/config/agent.config | 7 +
.../interceptor/BaseInterceptorMethods.java | 2 +-
.../apm/plugin/gson/GsonFromJsonInterceptor.java | 2 +-
.../apm/plugin/gson/GsonToJsonInterceptor.java | 2 +-
.../gateway/v20x/HttpClientRequestInterceptor.java | 2 +-
.../v20x/NettyRoutingFilterInterceptor.java | 2 +-
.../v21x/NettyRoutingFilterInterceptor.java | 2 +-
.../annotations/SpringAnnotationInterceptor.java | 2 +-
.../EndTransactionMethodInterceptor.java | 2 +-
.../GetTransactionMethodInterceptor.java | 2 +-
.../quartz/JobRunShellMethodInterceptor.java | 2 +-
.../plugin/zookeeper/ClientCnxnInterceptor.java | 1 -
.../zookeeper/EventThreadMethodInterceptor.java | 2 +-
.../java-agent/How-to-tolerate-exceptions.md | 114 ++++++++++++++++
.../setup/service-agent/java-agent/Plugin-list.md | 1 +
docs/en/setup/service-agent/java-agent/README.md | 4 +-
.../bin/startup.sh | 10 +-
.../config/expectedData.yaml | 148 +++++++++++++++++++++
.../configuration.yml | 11 +-
.../exception-checker-spring-scenario/pom.xml | 118 ++++++++++++++++
.../src/main/assembly/assembly.xml | 41 ++++++
.../apm/toolkit/trace/IgnoredException.java | 35 +++++
.../apm/testcase/exceptionchecker/Application.java | 34 +++++
.../controller/CaseController.java | 79 +++++++++++
.../exception/TestAnnotatedException.java | 47 +++++++
.../exceptionchecker/exception/TestException.java | 44 ++++++
.../exception/TestHierarchyListedException.java | 44 ++++++
.../exception/TestListedException.java | 44 ++++++
.../exceptionchecker/service/TestService.java | 50 +++++++
.../src/main/resources/application.yaml | 23 ++++
.../src/main/resources/log4j2.xml | 30 +++++
.../support-version.list | 9 +-
.../config/expectedData.yaml | 132 ++++++++++++++++++
.../configuration.yml | 12 +-
.../exception-checker-tomcat-scenario/pom.xml | 97 ++++++++++++++
.../apm/toolkit/trace/IgnoredException.java | 35 +++++
.../controller/CaseController.java | 79 +++++++++++
.../exception/TestAnnotatedException.java | 47 +++++++
.../exceptionchecker/exception/TestException.java | 44 ++++++
.../exception/TestHierarchyListedException.java | 44 ++++++
.../exception/TestListedException.java | 44 ++++++
.../exception/TestOtherClassLoaderException.java | 44 ++++++
.../exceptionchecker/service/TestService.java | 50 +++++++
.../src/main/resources/log4j2.xml | 30 +++++
.../src/main/webapp/WEB-INF/spring-mvc-servlet.xml | 30 +++++
.../src/main/webapp/WEB-INF/web.xml | 34 +++++
.../support-version.list | 9 +-
.../grpc-scenario/config/expectedData.yaml | 2 +-
250 files changed, 2653 insertions(+), 296 deletions(-)
diff --git a/.github/workflows/plugins-test.0.yaml b/.github/workflows/plugins-test.0.yaml
index c40ec57..df86e29 100644
--- a/.github/workflows/plugins-test.0.yaml
+++ b/.github/workflows/plugins-test.0.yaml
@@ -47,6 +47,8 @@ jobs:
- { name: 'elasticsearch-5.x-scenario', title: 'ElasticSearch 5.x (3)' }
- { name: 'elasticsearch-6.x-scenario', title: 'ElasticSearch 6.7.1-6.8.4 (7)' }
- { name: 'elasticsearch-7.x-scenario', title: 'ElasticSearch 7.0.0-7.5.2 (14)' }
+ - { name: 'exception-checker-spring-scenario', title: 'SpringBoot exception checker 1.0.0 (1)' }
+ - { name: 'exception-checker-tomcat-scenario', title: 'Tomcat exception checker 1.0.0 (1)' }
- { name: 'feign-scenario', title: 'Feign 9.0.0-9.5.1 (8)' }
- { name: 'finagle-17.10.x-scenario', title: 'Finagle 17.10.0-20.1.0(19)' }
- { name: 'finagle-6.25.x-scenario', title: 'Finagle 6.25.0-6.43.0 (18)' }
diff --git a/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java
new file mode 100644
index 0000000..372c250
--- /dev/null
+++ b/apm-application-toolkit/apm-toolkit-trace/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java
@@ -0,0 +1,35 @@
+/*
+ * 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.apm.toolkit.trace;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * After the exception status checker activated in the agent, the span wouldn't be marked as error status if the
+ * exception has this annotation.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface IgnoredException {
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java
index 47b8ebe..c1b1019 100755
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/conf/Config.java
@@ -20,7 +20,6 @@ package org.apache.skywalking.apm.agent.core.conf;
import java.util.HashMap;
import java.util.Map;
-
import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
import org.apache.skywalking.apm.agent.core.logging.core.LogLevel;
import org.apache.skywalking.apm.agent.core.logging.core.LogOutput;
@@ -268,6 +267,21 @@ public class Config {
public static String PATTERN = "%level %timestamp %thread %class : %msg %throwable";
}
+ public static class StatusCheck {
+ /**
+ * Listed exceptions would not be treated as an error. Because in some codes, the exception is being used as a
+ * way of controlling business flow.
+ */
+ public static String IGNORED_EXCEPTIONS = "";
+
+ /**
+ * The max recursive depth when checking the exception traced by the agent. Typically, we don't recommend
+ * setting this more than 10, which could cause a performance issue. Negative value and 0 would be ignored,
+ * which means all exceptions would make the span tagged in error status.
+ */
+ public static Integer MAX_RECURSIVE_DEPTH = 1;
+ }
+
public static class Plugin {
/**
* Control the length of the peer field.
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/AnnotationMatchExceptionCheckStrategy.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/AnnotationMatchExceptionCheckStrategy.java
new file mode 100644
index 0000000..61886ce
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/AnnotationMatchExceptionCheckStrategy.java
@@ -0,0 +1,36 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+
+/**
+ * AnnotationMatchExceptionCheckStrategy does an annotation matching check for a traced exception. If it has been
+ * annotated with org.apache.skywalking.apm.toolkit.trace.IgnoredException, the error status of the span wouldn't be
+ * changed. Because of the annotation supports integration, the subclasses would be also annotated with it.
+ */
+public class AnnotationMatchExceptionCheckStrategy implements ExceptionCheckStrategy {
+
+ private static final String TAG_NAME = AnnotationMatchExceptionCheckStrategy.class.getSimpleName();
+
+ @Override
+ public boolean isError(final Throwable e) {
+ return !(e instanceof EnhancedInstance) || !TAG_NAME.equals(((EnhancedInstance) e).getSkyWalkingDynamicField());
+ }
+}
\ No newline at end of file
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckContext.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckContext.java
new file mode 100644
index 0000000..7c9e1b4
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckContext.java
@@ -0,0 +1,50 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * ExceptionCheckContext contains the exceptions that have been checked by the exceptionCheckStrategies.
+ */
+public enum ExceptionCheckContext {
+ INSTANCE;
+
+ private final Set<Class<? extends Throwable>> ignoredExceptions = ConcurrentHashMap.newKeySet(32);
+ private final Set<Class<? extends Throwable>> errorStatusExceptions = ConcurrentHashMap.newKeySet(128);
+
+ public boolean isChecked(Throwable throwable) {
+ return ignoredExceptions.contains(throwable.getClass()) || errorStatusExceptions.contains(throwable.getClass());
+ }
+
+ public boolean isError(Throwable throwable) {
+ Class<? extends Throwable> clazz = throwable.getClass();
+ return errorStatusExceptions.contains(clazz) || (!ignoredExceptions.contains(clazz));
+ }
+
+ public void registerIgnoredException(Throwable throwable) {
+ ignoredExceptions.add(throwable.getClass());
+ }
+
+ public void registerErrorStatusException(Throwable throwable) {
+ errorStatusExceptions.add(throwable.getClass());
+ }
+
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckStrategy.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckStrategy.java
new file mode 100644
index 0000000..7fcc10e
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckStrategy.java
@@ -0,0 +1,27 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+/**
+ * The strategy checks the status of exception traced in a span.
+ */
+public interface ExceptionCheckStrategy {
+
+ boolean isError(Throwable e);
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/HierarchyMatchExceptionCheckStrategy.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/HierarchyMatchExceptionCheckStrategy.java
new file mode 100644
index 0000000..c1f80f3
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/HierarchyMatchExceptionCheckStrategy.java
@@ -0,0 +1,46 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
+
+/**
+ * HierarchyMatchExceptionCheckStrategy does a hierarchy check for a traced exception. If it or its parent has been
+ * listed in org.apache.skywalking.apm.agent.core.conf.Config.StatusCheck#IGNORED_EXCEPTIONS, the error status of the
+ * span wouldn't be changed.
+ */
+public class HierarchyMatchExceptionCheckStrategy implements ExceptionCheckStrategy {
+
+ @Override
+ public boolean isError(final Throwable e) {
+ Class<? extends Throwable> clazz = e.getClass();
+ StatusCheckService statusTriggerService = ServiceManager.INSTANCE.findService(StatusCheckService.class);
+ String[] ignoredExceptionNames = statusTriggerService.getIgnoredExceptionNames();
+ for (final String ignoredExceptionName : ignoredExceptionNames) {
+ try {
+ Class<?> parentClazz = Class.forName(ignoredExceptionName, true, clazz.getClassLoader());
+ if (parentClazz.isAssignableFrom(clazz)) {
+ return false;
+ }
+ } catch (ClassNotFoundException ignore) {
+ }
+ }
+ return true;
+ }
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/OffExceptionCheckStrategy.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/OffExceptionCheckStrategy.java
new file mode 100644
index 0000000..820ec32
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/OffExceptionCheckStrategy.java
@@ -0,0 +1,29 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+/**
+ * All exceptions would make the span tagged as the error status.
+ */
+public class OffExceptionCheckStrategy implements ExceptionCheckStrategy {
+ @Override
+ public boolean isError(final Throwable e) {
+ return true;
+ }
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckService.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckService.java
new file mode 100644
index 0000000..ebed2a4
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckService.java
@@ -0,0 +1,69 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import java.util.Arrays;
+import lombok.Getter;
+import org.apache.skywalking.apm.agent.core.boot.BootService;
+import org.apache.skywalking.apm.agent.core.boot.DefaultImplementor;
+import org.apache.skywalking.apm.agent.core.conf.Config;
+import org.apache.skywalking.apm.util.StringUtil;
+
+import static org.apache.skywalking.apm.agent.core.context.status.StatusChecker.HIERARCHY_MATCH;
+import static org.apache.skywalking.apm.agent.core.context.status.StatusChecker.OFF;
+
+/**
+ * The <code>StatusCheckService</code> determines whether the span should be tagged in error status if an exception
+ * captured in the scope.
+ */
+@DefaultImplementor
+public class StatusCheckService implements BootService {
+
+ @Getter
+ private String[] ignoredExceptionNames;
+
+ private StatusChecker statusChecker;
+
+ @Override
+ public void prepare() throws Throwable {
+ ignoredExceptionNames = Arrays.stream(Config.StatusCheck.IGNORED_EXCEPTIONS.split(","))
+ .filter(StringUtil::isNotEmpty)
+ .toArray(String[]::new);
+ statusChecker = Config.StatusCheck.MAX_RECURSIVE_DEPTH > 0 ? HIERARCHY_MATCH : OFF;
+ }
+
+ @Override
+ public void boot() throws Throwable {
+
+ }
+
+ @Override
+ public void onComplete() throws Throwable {
+
+ }
+
+ @Override
+ public void shutdown() throws Throwable {
+
+ }
+
+ public boolean isError(Throwable e) {
+ return statusChecker.checkStatus(e);
+ }
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/StatusChecker.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/StatusChecker.java
new file mode 100644
index 0000000..ea03202
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/StatusChecker.java
@@ -0,0 +1,90 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import lombok.AllArgsConstructor;
+import org.apache.skywalking.apm.agent.core.conf.Config;
+
+@AllArgsConstructor
+public enum StatusChecker {
+
+ /**
+ * All exceptions would make the span tagged as the error status.
+ */
+ OFF(
+ Collections.singletonList(new OffExceptionCheckStrategy()),
+ (isError, throwable) -> {
+ }
+ ),
+
+ /**
+ * Hierarchy check the status of the traced exception.
+ *
+ * @see HierarchyMatchExceptionCheckStrategy
+ * @see AnnotationMatchExceptionCheckStrategy
+ */
+ HIERARCHY_MATCH(
+ Arrays.asList(
+ new HierarchyMatchExceptionCheckStrategy(),
+ new AnnotationMatchExceptionCheckStrategy()
+ ),
+ (isError, throwable) -> {
+ if (isError) {
+ ExceptionCheckContext.INSTANCE.registerErrorStatusException(throwable);
+ } else {
+ ExceptionCheckContext.INSTANCE.registerIgnoredException(throwable);
+ }
+ }
+ );
+
+ private final List<ExceptionCheckStrategy> strategies;
+
+ private final ExceptionCheckCallback callback;
+
+ public boolean checkStatus(Throwable e) {
+ int maxDepth = Config.StatusCheck.MAX_RECURSIVE_DEPTH;
+ boolean isError = true;
+ while (isError && Objects.nonNull(e) && maxDepth-- > 0) {
+ isError = check(e);
+ e = e.getCause();
+ }
+ return isError;
+ }
+
+ private boolean check(final Throwable e) {
+ boolean isError = ExceptionCheckContext.INSTANCE.isChecked(e)
+ ? ExceptionCheckContext.INSTANCE.isError(e)
+ : strategies.stream().allMatch(item -> item.isError(e));
+ callback.onChecked(isError, e);
+ return isError;
+ }
+
+ /**
+ * The callback function would be triggered after an exception is checked by StatusChecker.
+ */
+ @FunctionalInterface
+ private interface ExceptionCheckCallback {
+ void onChecked(Boolean isError, Throwable throwable);
+ }
+
+}
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
index 4bcc7a0..a505e46 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java
@@ -22,8 +22,10 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.TracingContext;
+import org.apache.skywalking.apm.agent.core.context.status.StatusCheckService;
import org.apache.skywalking.apm.agent.core.context.tag.AbstractTag;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
import org.apache.skywalking.apm.agent.core.context.util.KeyValuePair;
@@ -163,6 +165,9 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
if (logs == null) {
logs = new LinkedList<>();
}
+ if (!errorOccurred && ServiceManager.INSTANCE.findService(StatusCheckService.class).isError(t)) {
+ errorOccurred();
+ }
logs.add(new LogDataEntity.Builder().add(new KeyValuePair("event", "error"))
.add(new KeyValuePair("error.kind", t.getClass().getName()))
.add(new KeyValuePair("message", t.getMessage()))
diff --git a/apm-sniffer/apm-agent-core/src/main/resources/META-INF/services/org.apache.skywalking.apm.agent.core.boot.BootService b/apm-sniffer/apm-agent-core/src/main/resources/META-INF/services/org.apache.skywalking.apm.agent.core.boot.BootService
index e1d84b9..d04e7c1 100644
--- a/apm-sniffer/apm-agent-core/src/main/resources/META-INF/services/org.apache.skywalking.apm.agent.core.boot.BootService
+++ b/apm-sniffer/apm-agent-core/src/main/resources/META-INF/services/org.apache.skywalking.apm.agent.core.boot.BootService
@@ -30,4 +30,5 @@ org.apache.skywalking.apm.agent.core.profile.ProfileTaskChannelService
org.apache.skywalking.apm.agent.core.profile.ProfileSnapshotSender
org.apache.skywalking.apm.agent.core.profile.ProfileTaskExecutionService
org.apache.skywalking.apm.agent.core.meter.MeterService
-org.apache.skywalking.apm.agent.core.meter.MeterSender
\ No newline at end of file
+org.apache.skywalking.apm.agent.core.meter.MeterSender
+org.apache.skywalking.apm.agent.core.context.status.StatusCheckService
\ No newline at end of file
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/boot/ServiceManagerTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/boot/ServiceManagerTest.java
index 829f10e..6186108 100644
--- a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/boot/ServiceManagerTest.java
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/boot/ServiceManagerTest.java
@@ -58,7 +58,7 @@ public class ServiceManagerTest {
public void testServiceDependencies() throws Exception {
HashMap<Class, BootService> registryService = getFieldValue(ServiceManager.INSTANCE, "bootedServices");
- assertThat(registryService.size(), is(15));
+ assertThat(registryService.size(), is(16));
assertTraceSegmentServiceClient(ServiceManager.INSTANCE.findService(TraceSegmentServiceClient.class));
assertContextManager(ServiceManager.INSTANCE.findService(ContextManager.class));
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/ContextManagerTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/ContextManagerTest.java
index 774da23..aeebccd 100644
--- a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/ContextManagerTest.java
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/ContextManagerTest.java
@@ -122,7 +122,6 @@ public class ContextManagerTest {
ContextCarrier injectContextCarrier = new ContextCarrier();
AbstractSpan exitSpan = ContextManager.createExitSpan("/textExitSpan", injectContextCarrier, "127.0.0.1:12800");
- exitSpan.errorOccurred();
exitSpan.log(new RuntimeException("exception"));
exitSpan.setComponent(ComponentsDefine.HTTPCLIENT);
@@ -238,7 +237,6 @@ public class ContextManagerTest {
ContextCarrier injectContextCarrier = new ContextCarrier();
AbstractSpan exitSpan = ContextManager.createExitSpan("/textExitSpan", injectContextCarrier, "127.0.0.1:12800");
- exitSpan.errorOccurred();
exitSpan.log(new RuntimeException("exception"));
exitSpan.setComponent(ComponentsDefine.HTTPCLIENT);
SpanLayer.asHttp(exitSpan);
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckStrategyTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckStrategyTest.java
new file mode 100644
index 0000000..e3bb9cb
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/ExceptionCheckStrategyTest.java
@@ -0,0 +1,70 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import java.util.Set;
+import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
+import org.apache.skywalking.apm.agent.core.conf.Config;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.powermock.api.support.membermodification.MemberModifier;
+
+public class ExceptionCheckStrategyTest {
+
+ @Before
+ public void prepare() {
+ Config.StatusCheck.IGNORED_EXCEPTIONS = "org.apache.skywalking.apm.agent.core.context.status.TestNamedMatchException";
+ Config.StatusCheck.MAX_RECURSIVE_DEPTH = 1;
+ ServiceManager.INSTANCE.boot();
+ }
+
+ @After
+ public void after() throws IllegalAccessException {
+ ((Set) MemberModifier
+ .field(ExceptionCheckContext.class, "ignoredExceptions")
+ .get(ExceptionCheckContext.INSTANCE)).clear();
+ ((Set) MemberModifier
+ .field(ExceptionCheckContext.class, "errorStatusExceptions")
+ .get(ExceptionCheckContext.INSTANCE)).clear();
+ }
+
+ @Test
+ public void checkOffExceptionCheckStrategy() {
+ OffExceptionCheckStrategy offExceptionCheckStrategy = new OffExceptionCheckStrategy();
+ Assert.assertTrue(offExceptionCheckStrategy.isError(new TestHierarchyMatchException()));
+ }
+
+ @Test
+ public void checkInheriteMatchExceptionCheckStrategy() {
+ HierarchyMatchExceptionCheckStrategy hierarchyMatchExceptionCheckStrategy = new HierarchyMatchExceptionCheckStrategy();
+ Assert.assertFalse(hierarchyMatchExceptionCheckStrategy.isError(new TestNamedMatchException()));
+ Assert.assertFalse(hierarchyMatchExceptionCheckStrategy.isError(new TestHierarchyMatchException()));
+ Assert.assertTrue(hierarchyMatchExceptionCheckStrategy.isError(new TestAnnotationMatchException()));
+ }
+
+ @Test
+ public void checkAnnotationMatchExceptionCheckStrategy() {
+ AnnotationMatchExceptionCheckStrategy annotationMatchExceptionCheckStrategy = new AnnotationMatchExceptionCheckStrategy();
+ Assert.assertFalse(annotationMatchExceptionCheckStrategy.isError(new TestAnnotationMatchException()));
+ Assert.assertTrue(annotationMatchExceptionCheckStrategy.isError(new TestHierarchyMatchException()));
+ }
+
+}
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckServiceCheckTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckServiceCheckTest.java
new file mode 100644
index 0000000..a1bb5a4
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckServiceCheckTest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import java.util.Set;
+import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
+import org.apache.skywalking.apm.agent.core.conf.Config;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.powermock.api.support.membermodification.MemberModifier;
+
+public class StatusCheckServiceCheckTest {
+
+ private Exception exception1;
+ private Exception exception2;
+ private Exception exception3;
+
+ @Before
+ public void prepare() {
+ Config.StatusCheck.IGNORED_EXCEPTIONS = "org.apache.skywalking.apm.agent.core.context.status.TestNamedMatchException";
+ Config.StatusCheck.MAX_RECURSIVE_DEPTH = 1;
+ ServiceManager.INSTANCE.boot();
+ exception1 = new TestNamedMatchException();
+ exception2 = new IllegalArgumentException(exception1);
+ exception3 = new IllegalArgumentException(exception2);
+ }
+
+ @After
+ public void after() throws IllegalAccessException {
+ ((Set) MemberModifier
+ .field(ExceptionCheckContext.class, "ignoredExceptions")
+ .get(ExceptionCheckContext.INSTANCE)).clear();
+ ((Set) MemberModifier
+ .field(ExceptionCheckContext.class, "errorStatusExceptions")
+ .get(ExceptionCheckContext.INSTANCE)).clear();
+ }
+
+ @Test
+ public void testDepth_1() {
+ Config.StatusCheck.MAX_RECURSIVE_DEPTH = 1;
+ StatusCheckService service = ServiceManager.INSTANCE.findService(StatusCheckService.class);
+ Assert.assertFalse(service.isError(exception1));
+ Assert.assertTrue(service.isError(exception2));
+ Assert.assertTrue(service.isError(exception3));
+ }
+
+ @Test
+ public void testDepth_2() {
+ Config.StatusCheck.MAX_RECURSIVE_DEPTH = 2;
+ StatusCheckService service = ServiceManager.INSTANCE.findService(StatusCheckService.class);
+ Assert.assertFalse(service.isError(exception1));
+ Assert.assertFalse(service.isError(exception2));
+ Assert.assertTrue(service.isError(exception3));
+ }
+
+ @Test
+ public void testDepth_3() {
+ Config.StatusCheck.MAX_RECURSIVE_DEPTH = 3;
+ StatusCheckService service = ServiceManager.INSTANCE.findService(StatusCheckService.class);
+ Assert.assertFalse(service.isError(exception1));
+ Assert.assertFalse(service.isError(exception2));
+ Assert.assertFalse(service.isError(exception3));
+ }
+
+}
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckerTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckerTest.java
new file mode 100644
index 0000000..dc93694
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/StatusCheckerTest.java
@@ -0,0 +1,77 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import java.util.Set;
+import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
+import org.apache.skywalking.apm.agent.core.conf.Config;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.powermock.api.support.membermodification.MemberModifier;
+
+import static org.apache.skywalking.apm.agent.core.context.status.StatusChecker.HIERARCHY_MATCH;
+import static org.apache.skywalking.apm.agent.core.context.status.StatusChecker.OFF;
+
+public class StatusCheckerTest {
+
+ @Before
+ public void prepare() {
+ Config.StatusCheck.IGNORED_EXCEPTIONS = "org.apache.skywalking.apm.agent.core.context.status.TestNamedMatchException";
+ Config.StatusCheck.MAX_RECURSIVE_DEPTH = 1;
+ ServiceManager.INSTANCE.boot();
+ }
+
+ @After
+ public void after() throws IllegalAccessException {
+ ((Set) MemberModifier
+ .field(ExceptionCheckContext.class, "ignoredExceptions")
+ .get(ExceptionCheckContext.INSTANCE)).clear();
+ ((Set) MemberModifier
+ .field(ExceptionCheckContext.class, "errorStatusExceptions")
+ .get(ExceptionCheckContext.INSTANCE)).clear();
+ }
+
+ @Test
+ public void checkOffStatusChecker() {
+ Assert.assertTrue(OFF.checkStatus(new Throwable()));
+ Assert.assertTrue(OFF.checkStatus(new TestHierarchyMatchException()));
+ Assert.assertTrue(OFF.checkStatus(new TestNamedMatchException()));
+ Assert.assertTrue(OFF.checkStatus(new IllegalArgumentException()));
+ }
+
+ @Test
+ public void checkInheritNamedAndAnnotationMatchStatusChecker() throws IllegalAccessException {
+ Assert.assertTrue(HIERARCHY_MATCH.checkStatus(new Throwable()));
+ Assert.assertTrue(HIERARCHY_MATCH.checkStatus(new IllegalArgumentException()));
+ Assert.assertFalse(HIERARCHY_MATCH.checkStatus(new TestNamedMatchException()));
+ Assert.assertFalse(HIERARCHY_MATCH.checkStatus(new TestHierarchyMatchException()));
+ Assert.assertFalse(HIERARCHY_MATCH.checkStatus(new TestAnnotationMatchException()));
+ Set ignoredExceptions = (Set) MemberModifier
+ .field(ExceptionCheckContext.class, "ignoredExceptions")
+ .get(ExceptionCheckContext.INSTANCE);
+ Set errorStatusExceptions = (Set) MemberModifier
+ .field(ExceptionCheckContext.class, "errorStatusExceptions")
+ .get(ExceptionCheckContext.INSTANCE);
+ Assert.assertTrue(ignoredExceptions.size() > 0);
+ Assert.assertTrue(errorStatusExceptions.size() > 0);
+ }
+
+}
\ No newline at end of file
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestAnnotationMatchException.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestAnnotationMatchException.java
new file mode 100644
index 0000000..904e321
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestAnnotationMatchException.java
@@ -0,0 +1,56 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+
+public class TestAnnotationMatchException extends RuntimeException implements EnhancedInstance {
+
+ public TestAnnotationMatchException() {
+ }
+
+ public TestAnnotationMatchException(final String message) {
+ super(message);
+ }
+
+ public TestAnnotationMatchException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestAnnotationMatchException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestAnnotationMatchException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return AnnotationMatchExceptionCheckStrategy.class.getSimpleName();
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(final Object value) {
+
+ }
+}
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestHierarchyMatchException.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestHierarchyMatchException.java
new file mode 100644
index 0000000..c189038
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestHierarchyMatchException.java
@@ -0,0 +1,44 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+public class TestHierarchyMatchException extends TestNamedMatchException {
+
+ public TestHierarchyMatchException() {
+ }
+
+ public TestHierarchyMatchException(final String message) {
+ super(message);
+ }
+
+ public TestHierarchyMatchException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestHierarchyMatchException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestHierarchyMatchException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestNamedMatchException.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestNamedMatchException.java
new file mode 100644
index 0000000..e86321d
--- /dev/null
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/status/TestNamedMatchException.java
@@ -0,0 +1,44 @@
+/*
+ * 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.apm.agent.core.context.status;
+
+public class TestNamedMatchException extends RuntimeException {
+
+ public TestNamedMatchException() {
+ }
+
+ public TestNamedMatchException(final String message) {
+ super(message);
+ }
+
+ public TestNamedMatchException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestNamedMatchException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestNamedMatchException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQConsumerInterceptor.java b/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQConsumerInterceptor.java
index 4818d0e..4ee9162 100644
--- a/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQConsumerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQConsumerInterceptor.java
@@ -88,6 +88,6 @@ public class ActiveMQConsumerInterceptor implements InstanceMethodsAroundInterce
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQProducerInterceptor.java b/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQProducerInterceptor.java
index 73d7e80..993d4a9 100644
--- a/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQProducerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/activemq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/activemq/ActiveMQProducerInterceptor.java
@@ -80,6 +80,6 @@ public class ActiveMQProducerInterceptor implements InstanceMethodsAroundInterce
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ClientInterceptor.java
index 7df2bbb..2546047 100644
--- a/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ClientInterceptor.java
@@ -87,7 +87,7 @@ public class Armeria084ClientInterceptor implements InstanceMethodsAroundInterce
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ServerInterceptor.java b/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ServerInterceptor.java
index 5ca24e7..a796a28 100644
--- a/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ServerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/armeria-0.84.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria084ServerInterceptor.java
@@ -68,7 +68,7 @@ public class Armeria084ServerInterceptor implements InstanceMethodsAroundInterce
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria085ServerInterceptor.java b/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria085ServerInterceptor.java
index 6e7e484..4f21950 100644
--- a/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria085ServerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/Armeria085ServerInterceptor.java
@@ -68,7 +68,7 @@ public class Armeria085ServerInterceptor implements InstanceMethodsAroundInterce
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/ArmeriaClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/ArmeriaClientInterceptor.java
index a62d5c7..e39239b 100644
--- a/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/ArmeriaClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/armeria-0.85.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/armeria/ArmeriaClientInterceptor.java
@@ -73,7 +73,7 @@ public abstract class ArmeriaClientInterceptor implements InstanceMethodsAroundI
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/AbstractRequestInterceptor.java b/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/AbstractRequestInterceptor.java
index 59f2036..d375c91 100644
--- a/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/AbstractRequestInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/AbstractRequestInterceptor.java
@@ -64,7 +64,7 @@ public abstract class AbstractRequestInterceptor implements InstanceConstructorI
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/ResponderInterceptor.java b/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/ResponderInterceptor.java
index 503ef28..0b3b773 100644
--- a/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/ResponderInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/avro-plugin/src/main/java/org/apache/skywalking/apm/plugin/avro/ResponderInterceptor.java
@@ -56,7 +56,7 @@ public class ResponderInterceptor implements InstanceConstructorInterceptor, Ins
public void handleMethodException(EnhancedInstance enhancedInstance, Method method, Object[] objects,
Class<?>[] classes, Throwable throwable) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(throwable);
+ ContextManager.activeSpan().log(throwable);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ClientInterceptor.java
index 3c53c26..0a6fb64 100644
--- a/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ClientInterceptor.java
@@ -74,7 +74,6 @@ public class ClientInterceptor implements InstanceMethodsAroundInterceptor {
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
diff --git a/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ServerInterceptor.java b/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ServerInterceptor.java
index d6a2046..7f0e589 100644
--- a/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ServerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/baidu-brpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/baidu/brpc/ServerInterceptor.java
@@ -60,7 +60,6 @@ public class ServerInterceptor implements InstanceMethodsAroundInterceptor {
if (response != null && response.getException() != null) {
AbstractSpan span = ContextManager.activeSpan();
span.log(response.getException());
- span.errorOccurred();
}
ContextManager.stopSpan();
@@ -71,7 +70,6 @@ public class ServerInterceptor implements InstanceMethodsAroundInterceptor {
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/canal-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/canal/CanalInterceptor.java b/apm-sniffer/apm-sdk-plugin/canal-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/canal/CanalInterceptor.java
index de8173a..fc2fed6 100644
--- a/apm-sniffer/apm-sdk-plugin/canal-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/canal/CanalInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/canal-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/canal/CanalInterceptor.java
@@ -78,6 +78,6 @@ public class CanalInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
\ No newline at end of file
diff --git a/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/ClusterConnectInterceptor.java b/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/ClusterConnectInterceptor.java
index 88eb6f1..1c75f61 100644
--- a/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/ClusterConnectInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/ClusterConnectInterceptor.java
@@ -50,7 +50,6 @@ public class ClusterConnectInterceptor implements InstanceMethodsAroundIntercept
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/DefaultResultSetFutureGetUninterruptiblyInterceptor.java b/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/DefaultResultSetFutureGetUninterruptiblyInterceptor.java
index b5fdaf0..d453d10 100644
--- a/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/DefaultResultSetFutureGetUninterruptiblyInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/DefaultResultSetFutureGetUninterruptiblyInterceptor.java
@@ -53,7 +53,6 @@ public class DefaultResultSetFutureGetUninterruptiblyInterceptor implements Inst
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/SessionManagerExecuteAndExecuteAsyncWithStatementArgInterceptor.java b/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/SessionManagerExecuteAndExecuteAsyncWithStatementArgInterceptor.java
index 8af5fc4..82a690a 100644
--- a/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/SessionManagerExecuteAndExecuteAsyncWithStatementArgInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/cassandra-java-driver-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/cassandra/java/driver/v3/SessionManagerExecuteAndExecuteAsyncWithStatementArgInterceptor.java
@@ -77,7 +77,6 @@ public class SessionManagerExecuteAndExecuteAsyncWithStatementArgInterceptor imp
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java b/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java
index 23fad05..f032cb2 100644
--- a/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java
@@ -126,7 +126,6 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
*/
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
diff --git a/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/DubboInterceptor.java b/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/DubboInterceptor.java
index 15480f1..8d3492b 100644
--- a/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/DubboInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/DubboInterceptor.java
@@ -113,7 +113,6 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
*/
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java
index ba36be7..c8f046d 100644
--- a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java
@@ -61,6 +61,6 @@ public class EhcacheLockInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java
index 5dec441..066bca0 100644
--- a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java
@@ -50,6 +50,6 @@ public class EhcacheOperateAllInterceptor implements InstanceMethodsAroundInterc
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java
index 94ff472..46bcbdc 100644
--- a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java
@@ -57,6 +57,6 @@ public class EhcacheOperateElementInterceptor implements InstanceMethodsAroundIn
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java
index 551ecb5..f94528f 100644
--- a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java
@@ -56,6 +56,6 @@ public class EhcacheOperateObjectInterceptor implements InstanceMethodsAroundInt
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elastic-job-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/esjob/JobExecutorInterceptor.java b/apm-sniffer/apm-sdk-plugin/elastic-job-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/esjob/JobExecutorInterceptor.java
index 3a87b37..5084ffe 100644
--- a/apm-sniffer/apm-sdk-plugin/elastic-job-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/esjob/JobExecutorInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elastic-job-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/esjob/JobExecutorInterceptor.java
@@ -68,6 +68,6 @@ public class JobExecutorInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elastic-job-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticjob/ElasticJobExecutorInterceptor.java b/apm-sniffer/apm-sdk-plugin/elastic-job-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticjob/ElasticJobExecutorInterceptor.java
index 95bbc7d..9c223ff 100644
--- a/apm-sniffer/apm-sdk-plugin/elastic-job-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticjob/ElasticJobExecutorInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elastic-job-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticjob/ElasticJobExecutorInterceptor.java
@@ -55,6 +55,6 @@ public class ElasticJobExecutorInterceptor implements InstanceMethodsAroundInter
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/PlainListenableActionFutureInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/PlainListenableActionFutureInterceptor.java
index 91debe8..1689118 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/PlainListenableActionFutureInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/PlainListenableActionFutureInterceptor.java
@@ -66,6 +66,6 @@ public class PlainListenableActionFutureInterceptor implements InstanceMethodsAr
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/TransportActionNodeProxyInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/TransportActionNodeProxyInterceptor.java
index 9fbaa5f..94c1dd2 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/TransportActionNodeProxyInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/TransportActionNodeProxyInterceptor.java
@@ -71,7 +71,7 @@ public class TransportActionNodeProxyInterceptor implements InstanceConstructorI
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
@Override
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/AdapterActionFutureActionGetMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/AdapterActionFutureActionGetMethodsInterceptor.java
index 5ac49f2..381fb79 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/AdapterActionFutureActionGetMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/AdapterActionFutureActionGetMethodsInterceptor.java
@@ -71,7 +71,7 @@ public class AdapterActionFutureActionGetMethodsInterceptor implements InstanceM
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private boolean isTrace(EnhancedInstance objInst) {
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientGetSettingsMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientGetSettingsMethodsInterceptor.java
index 41a5d59..5448458 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientGetSettingsMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientGetSettingsMethodsInterceptor.java
@@ -18,8 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -31,6 +29,8 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class ClusterClientGetSettingsMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
@@ -62,7 +62,7 @@ public class ClusterClientGetSettingsMethodsInterceptor implements InstanceMetho
Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) {
RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) (objInst.getSkyWalkingDynamicField());
if (restClientEnhanceInfo != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientHealthMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientHealthMethodsInterceptor.java
index fbcb72f..8156317 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientHealthMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientHealthMethodsInterceptor.java
@@ -18,8 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -31,6 +29,8 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class ClusterClientHealthMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
@@ -61,7 +61,7 @@ public class ClusterClientHealthMethodsInterceptor implements InstanceMethodsAro
Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) {
RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) (objInst.getSkyWalkingDynamicField());
if (restClientEnhanceInfo != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientPutSettingsMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientPutSettingsMethodsInterceptor.java
index bb4b77b..49de6a2 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientPutSettingsMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/ClusterClientPutSettingsMethodsInterceptor.java
@@ -18,9 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -34,6 +31,9 @@ import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
import org.elasticsearch.common.settings.Settings;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class ClusterClientPutSettingsMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
@@ -80,7 +80,7 @@ public class ClusterClientPutSettingsMethodsInterceptor implements InstanceMetho
Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) {
RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) (objInst.getSkyWalkingDynamicField());
if (restClientEnhanceInfo != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientCreateMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientCreateMethodsInterceptor.java
index 46145cf..f3c4191 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientCreateMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientCreateMethodsInterceptor.java
@@ -18,9 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -33,6 +30,9 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.client.indices.CreateIndexRequest;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class IndicesClientCreateMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
@@ -70,7 +70,7 @@ public class IndicesClientCreateMethodsInterceptor implements InstanceMethodsAro
Class<?>[] argumentsTypes, Throwable t) {
RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) (objInst.getSkyWalkingDynamicField());
if (restClientEnhanceInfo != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientDeleteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientDeleteMethodsInterceptor.java
index 6708ea6..1d2cbec 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientDeleteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/IndicesClientDeleteMethodsInterceptor.java
@@ -18,8 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import java.util.Arrays;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
@@ -33,6 +31,8 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class IndicesClientDeleteMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
@@ -66,7 +66,7 @@ public class IndicesClientDeleteMethodsInterceptor implements InstanceMethodsAro
Class<?>[] argumentsTypes, Throwable t) {
RestClientEnhanceInfo restClientEnhanceInfo = (RestClientEnhanceInfo) (objInst.getSkyWalkingDynamicField());
if (restClientEnhanceInfo != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientGetMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientGetMethodsInterceptor.java
index b181aac..3716888 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientGetMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientGetMethodsInterceptor.java
@@ -18,9 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -33,6 +30,9 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.action.get.GetRequest;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class RestHighLevelClientGetMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
@@ -63,6 +63,6 @@ public class RestHighLevelClientGetMethodsInterceptor implements InstanceMethods
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientIndexMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientIndexMethodsInterceptor.java
index f7c4976..c5c536e 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientIndexMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientIndexMethodsInterceptor.java
@@ -18,9 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -33,6 +30,9 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.action.index.IndexRequest;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class RestHighLevelClientIndexMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
@@ -63,6 +63,6 @@ public class RestHighLevelClientIndexMethodsInterceptor implements InstanceMetho
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientSearchMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientSearchMethodsInterceptor.java
index 3439f3b..c41b541 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientSearchMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientSearchMethodsInterceptor.java
@@ -18,9 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import java.util.Arrays;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
@@ -34,6 +31,9 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.action.search.SearchRequest;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class RestHighLevelClientSearchMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
@@ -64,6 +64,6 @@ public class RestHighLevelClientSearchMethodsInterceptor implements InstanceMeth
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientUpdateMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientUpdateMethodsInterceptor.java
index 491b5a1..23b3f48 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientUpdateMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/RestHighLevelClientUpdateMethodsInterceptor.java
@@ -18,9 +18,6 @@
package org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
-import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
-
import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
@@ -33,6 +30,9 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
import org.apache.skywalking.apm.plugin.elasticsearch.v6.RestClientEnhanceInfo;
import org.elasticsearch.action.update.UpdateRequest;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.ElasticsearchPluginConfig.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants.DB_TYPE;
+
public class RestHighLevelClientUpdateMethodsInterceptor implements InstanceMethodsAroundInterceptor {
@Override
@@ -63,6 +63,6 @@ public class RestHighLevelClientUpdateMethodsInterceptor implements InstanceMeth
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptor.java
index ad0f252..5e92651 100644
--- a/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptor.java
@@ -71,7 +71,7 @@ public class TransportActionNodeProxyExecuteMethodsInterceptor implements Instan
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
@Override
diff --git a/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
index 6bd87ac..81b4d3b 100644
--- a/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/feign-default-http-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/feign/http/v9/DefaultHttpClientInterceptor.java
@@ -165,6 +165,5 @@ public class DefaultHttpClientInterceptor implements InstanceMethodsAroundInterc
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
activeSpan.log(t);
- activeSpan.errorOccurred();
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientDestTracingFilterInterceptor.java b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientDestTracingFilterInterceptor.java
index 78c0692..a343343 100644
--- a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientDestTracingFilterInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientDestTracingFilterInterceptor.java
@@ -63,7 +63,7 @@ public class ClientDestTracingFilterInterceptor extends AbstractInterceptor {
* there is an active span
*/
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientTracingFilterInterceptor.java b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientTracingFilterInterceptor.java
index b15ae66..00b5c93 100644
--- a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientTracingFilterInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ClientTracingFilterInterceptor.java
@@ -83,7 +83,6 @@ public class ClientTracingFilterInterceptor extends AbstractInterceptor {
@Override
public void onFailure(Throwable cause) {
- finagleSpan.errorOccurred();
finagleSpan.log(cause);
finagleSpan.asyncFinish();
}
@@ -94,6 +93,6 @@ public class ClientTracingFilterInterceptor extends AbstractInterceptor {
@Override
public void handleMethodExceptionImpl(EnhancedInstance enhancedInstance, Method method, Object[] objects, Class<?>[] classes, Throwable throwable) {
- ContextManager.activeSpan().errorOccurred().log(throwable);
+ ContextManager.activeSpan().log(throwable);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ServerTracingFilterInterceptor.java b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ServerTracingFilterInterceptor.java
index c5d62e3..45e12b6 100644
--- a/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ServerTracingFilterInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/finagle-6.25.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/finagle/ServerTracingFilterInterceptor.java
@@ -78,7 +78,6 @@ public class ServerTracingFilterInterceptor extends AbstractInterceptor {
@Override
public void onFailure(Throwable cause) {
- finagleSpan.errorOccurred();
finagleSpan.log(cause);
finagleSpan.asyncFinish();
}
@@ -90,6 +89,6 @@ public class ServerTracingFilterInterceptor extends AbstractInterceptor {
@Override
public void handleMethodExceptionImpl(EnhancedInstance enhancedInstance, Method method, Object[] objects,
Class<?>[] classes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-12.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v12/GraphqlInterceptor.java b/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-12.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v12/GraphqlInterceptor.java
index 219db91..013aa5d 100644
--- a/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-12.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v12/GraphqlInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-12.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v12/GraphqlInterceptor.java
@@ -64,7 +64,6 @@ public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v8/GraphqlInterceptor.java b/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v8/GraphqlInterceptor.java
index 3a76079..b6c9ea2 100644
--- a/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v8/GraphqlInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v8/GraphqlInterceptor.java
@@ -95,7 +95,6 @@ public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v9/GraphqlInterceptor.java b/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v9/GraphqlInterceptor.java
index 5a6ce5f..7ddca75 100644
--- a/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v9/GraphqlInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/graphql-plugin/graphql-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/graphql/v9/GraphqlInterceptor.java
@@ -64,7 +64,6 @@ public class GraphqlInterceptor implements InstanceMethodsAroundInterceptor {
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/BlockingCallInterceptor.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/BlockingCallInterceptor.java
index a55d9f3..67607de 100644
--- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/BlockingCallInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/BlockingCallInterceptor.java
@@ -55,6 +55,6 @@ public class BlockingCallInterceptor implements StaticMethodsAroundInterceptor {
@Override
public void handleMethodException(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes,
Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java
index 908a585..fc3a585 100644
--- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java
+++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/client/TracingClientCall.java
@@ -93,7 +93,7 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
try {
delegate().start(new TracingClientCallListener(responseListener, snapshot), headers);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
if (blockingSpan == null) {
@@ -117,7 +117,7 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
try {
super.sendMessage(message);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
@@ -134,7 +134,7 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
try {
super.halfClose();
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
@@ -155,7 +155,7 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
try {
super.cancel(message, cause);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
@@ -185,7 +185,7 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
try {
delegate().onMessage(message);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
} finally {
ContextManager.stopSpan();
}
@@ -198,14 +198,14 @@ class TracingClientCall<REQUEST, RESPONSE> extends ForwardingClientCall.SimpleFo
span.setLayer(SpanLayer.RPC_FRAMEWORK);
ContextManager.continued(contextSnapshot);
if (!status.isOk()) {
- span.errorOccurred().log(status.asRuntimeException());
+ span.log(status.asRuntimeException());
Tags.STATUS_CODE.set(span, status.getCode().name());
}
try {
delegate().onClose(status, trailers);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
} finally {
ContextManager.stopSpan();
}
diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java
index 946705c..195535e 100644
--- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java
+++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCall.java
@@ -57,7 +57,7 @@ public class TracingServerCall<REQUEST, RESPONSE> extends ForwardingServerCall.S
try {
super.sendMessage(message);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
@@ -82,9 +82,9 @@ public class TracingServerCall<REQUEST, RESPONSE> extends ForwardingServerCall.S
case UNKNOWN:
case INTERNAL:
if (status.getCause() == null) {
- span.errorOccurred().log(status.asRuntimeException());
+ span.log(status.asRuntimeException());
} else {
- span.errorOccurred().log(status.getCause());
+ span.log(status.getCause());
}
break;
// Other status code means some predictable error occurred in server.
@@ -93,7 +93,7 @@ public class TracingServerCall<REQUEST, RESPONSE> extends ForwardingServerCall.S
default:
// But if the status still has cause exception, we will log it too.
if (status.getCause() != null) {
- span.errorOccurred().log(status.getCause());
+ span.log(status.getCause());
}
break;
}
@@ -102,7 +102,7 @@ public class TracingServerCall<REQUEST, RESPONSE> extends ForwardingServerCall.S
try {
super.close(status, trailers);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
diff --git a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java
index 114b776..231bdd4 100644
--- a/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java
+++ b/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/TracingServerCallListener.java
@@ -58,7 +58,7 @@ public class TracingServerCallListener<REQUEST> extends ForwardingServerCallList
try {
super.onMessage(message);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
@@ -78,7 +78,7 @@ public class TracingServerCallListener<REQUEST> extends ForwardingServerCallList
try {
super.onCancel();
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
@@ -95,7 +95,7 @@ public class TracingServerCallListener<REQUEST> extends ForwardingServerCallList
try {
super.onHalfClose();
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
ContextManager.stopSpan();
diff --git a/apm-sniffer/apm-sdk-plugin/hbase-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hbase/HTableInterceptor.java b/apm-sniffer/apm-sdk-plugin/hbase-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hbase/HTableInterceptor.java
index 363caa4..cf3fdbe 100644
--- a/apm-sniffer/apm-sdk-plugin/hbase-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hbase/HTableInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/hbase-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hbase/HTableInterceptor.java
@@ -102,7 +102,6 @@ public class HTableInterceptor implements InstanceMethodsAroundInterceptor, Inst
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
index a307817..d84f862 100644
--- a/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/httpClient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpClient/v4/HttpClientExecuteInterceptor.java
@@ -96,7 +96,6 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/FutureCallbackWrapper.java b/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/FutureCallbackWrapper.java
index 597980d..28f4ecc 100644
--- a/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/FutureCallbackWrapper.java
+++ b/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/FutureCallbackWrapper.java
@@ -49,7 +49,7 @@ public class FutureCallbackWrapper<T> implements FutureCallback<T> {
public void failed(Exception e) {
CONTEXT_LOCAL.remove();
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(e);
+ ContextManager.activeSpan().log(e);
ContextManager.stopSpan();
}
if (callback != null) {
diff --git a/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java b/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java
index c957b26..4cbe2f6 100644
--- a/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java
+++ b/apm-sniffer/apm-sdk-plugin/httpasyncclient-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpasyncclient/v4/wrapper/HttpAsyncResponseConsumerWrapper.java
@@ -70,7 +70,7 @@ public class HttpAsyncResponseConsumerWrapper<T> implements HttpAsyncResponseCon
public void failed(Exception ex) {
CONTEXT_LOCAL.remove();
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(ex);
+ ContextManager.activeSpan().log(ex);
ContextManager.stopSpan();
}
consumer.failed(ex);
diff --git a/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
index 1144dd3..a2a4312 100644
--- a/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/httpclient-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/httpclient/v3/HttpClientExecuteInterceptor.java
@@ -89,7 +89,7 @@ public class HttpClientExecuteInterceptor implements InstanceMethodsAroundInterc
@Override
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private String getRequestURI(URI uri) throws URIException {
diff --git a/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java b/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java
index 7225f2a..f2717b9 100644
--- a/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandGetFallbackInterceptor.java
@@ -51,6 +51,6 @@ public class HystrixCommandGetFallbackInterceptor implements InstanceMethodsArou
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java b/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java
index 2c5f324..978d34c 100644
--- a/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/hystrix-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/hystrix/v1/HystrixCommandRunInterceptor.java
@@ -55,6 +55,6 @@ public class HystrixCommandRunInterceptor implements InstanceMethodsAroundInterc
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/influxdb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/influxdb/interceptor/InfluxDBMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/influxdb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/influxdb/interceptor/InfluxDBMethodInterceptor.java
index 4cd35ce..6d12f9f 100644
--- a/apm-sniffer/apm-sdk-plugin/influxdb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/influxdb/interceptor/InfluxDBMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/influxdb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/influxdb/interceptor/InfluxDBMethodInterceptor.java
@@ -92,6 +92,6 @@ public class InfluxDBMethodInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionServiceMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionServiceMethodInterceptor.java
index d5b93cc..3c5984e 100644
--- a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionServiceMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionServiceMethodInterceptor.java
@@ -62,7 +62,7 @@ public class ConnectionServiceMethodInterceptor implements InstanceMethodsAround
@Override
public final void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/CallableStatementTracing.java b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/CallableStatementTracing.java
index fc68f7d..3aabf95 100644
--- a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/CallableStatementTracing.java
+++ b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/CallableStatementTracing.java
@@ -42,7 +42,6 @@ public class CallableStatementTracing {
span.setComponent(connectInfo.getComponent());
return exec.exe(realStatement, sql);
} catch (SQLException e) {
- span.errorOccurred();
span.log(e);
throw e;
} finally {
diff --git a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/PreparedStatementTracing.java b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/PreparedStatementTracing.java
index 51bdf7c..f9a144e 100644
--- a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/PreparedStatementTracing.java
+++ b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/PreparedStatementTracing.java
@@ -43,7 +43,6 @@ public class PreparedStatementTracing {
SpanLayer.asDB(span);
return exec.exe(realStatement, sql);
} catch (SQLException e) {
- span.errorOccurred();
span.log(e);
throw e;
} finally {
diff --git a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/StatementTracing.java b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/StatementTracing.java
index e0ca48f..c750e24 100644
--- a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/StatementTracing.java
+++ b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/trace/StatementTracing.java
@@ -42,7 +42,6 @@ public class StatementTracing {
return exec.exe(realStatement, sql);
} catch (SQLException e) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(e);
throw e;
} finally {
diff --git a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/test/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionTracing.java b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/test/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionTracing.java
index bac9888..a8d591d 100755
--- a/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/test/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionTracing.java
+++ b/apm-sniffer/apm-sdk-plugin/jdbc-commons/src/test/java/org/apache/skywalking/apm/plugin/jdbc/ConnectionTracing.java
@@ -39,7 +39,6 @@ public class ConnectionTracing {
SpanLayer.asDB(span);
return exec.exe(realConnection, sql);
} catch (SQLException e) {
- span.errorOccurred();
span.log(e);
throw e;
} finally {
diff --git a/apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
index 6152127..88381fb 100644
--- a/apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jedis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jedis/v2/JedisMethodInterceptor.java
@@ -58,7 +58,6 @@ public class JedisMethodInterceptor implements InstanceMethodsAroundInterceptor
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v90/client/SyncHttpRequestSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v90/client/SyncHttpRequestSendInterceptor.java
index 049e132..59c6eb2 100644
--- a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v90/client/SyncHttpRequestSendInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v90/client/SyncHttpRequestSendInterceptor.java
@@ -67,7 +67,7 @@ public class SyncHttpRequestSendInterceptor implements InstanceMethodsAroundInte
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
public String getHttpMethod(HttpRequest request) {
diff --git a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/client/SyncHttpRequestSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/client/SyncHttpRequestSendInterceptor.java
index 0e0f86a..c58f90c 100644
--- a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/client/SyncHttpRequestSendInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-client-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/client/SyncHttpRequestSendInterceptor.java
@@ -66,7 +66,7 @@ public class SyncHttpRequestSendInterceptor implements InstanceMethodsAroundInte
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
public String getHttpMethod(HttpRequest request) {
diff --git a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java
index cc5d2c0..d872fdc 100644
--- a/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/jetty-plugin/jetty-server-9.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jetty/v9/server/HandleInterceptor.java
@@ -83,6 +83,6 @@ public class HandleInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/kafka-commons/src/main/java/org/apache/skywalking/apm/plugin/kafka/define/InterceptorMethod.java b/apm-sniffer/apm-sdk-plugin/kafka-commons/src/main/java/org/apache/skywalking/apm/plugin/kafka/define/InterceptorMethod.java
index a5d019a..e9805d4 100644
--- a/apm-sniffer/apm-sdk-plugin/kafka-commons/src/main/java/org/apache/skywalking/apm/plugin/kafka/define/InterceptorMethod.java
+++ b/apm-sniffer/apm-sdk-plugin/kafka-commons/src/main/java/org/apache/skywalking/apm/plugin/kafka/define/InterceptorMethod.java
@@ -42,7 +42,7 @@ public class InterceptorMethod {
public static void handleMethodException(Throwable t) {
KafkaContext context = (KafkaContext) ContextManager.getRuntimeContext().get(Constants.KAFKA_FLAG);
if (context != null && context.isNeedStop()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackAdapterInterceptor.java b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackAdapterInterceptor.java
index df3d4ab..1717e12 100644
--- a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackAdapterInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackAdapterInterceptor.java
@@ -55,11 +55,11 @@ public class CallbackAdapterInterceptor implements Callback {
try {
callbackCache.getCallback().onCompletion(metadata, exception);
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
throw t;
} finally {
if (exception != null) {
- ContextManager.activeSpan().errorOccurred().log(exception);
+ ContextManager.activeSpan().log(exception);
}
ContextManager.stopSpan();
}
diff --git a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackInterceptor.java b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackInterceptor.java
index 8cba764..888c330 100644
--- a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/CallbackInterceptor.java
@@ -63,7 +63,7 @@ public class CallbackInterceptor implements InstanceMethodsAroundInterceptor {
if (null != snapshot) {
Exception exceptions = (Exception) allArguments[1];
if (exceptions != null) {
- ContextManager.activeSpan().errorOccurred().log(exceptions);
+ ContextManager.activeSpan().log(exceptions);
}
ContextManager.stopSpan();
}
@@ -74,7 +74,7 @@ public class CallbackInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private ContextSnapshot getSnapshot(CallbackCache cache) {
diff --git a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/KafkaConsumerInterceptor.java b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/KafkaConsumerInterceptor.java
index aa849d0..4c70c00 100644
--- a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/KafkaConsumerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/KafkaConsumerInterceptor.java
@@ -107,7 +107,7 @@ public class KafkaConsumerInterceptor implements InstanceMethodsAroundIntercepto
* {@link #afterMethod}, before the creation of entry span, we can not ensure there is an active span
*/
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/SubscribeMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/SubscribeMethodInterceptor.java
index 039509c..1bb3461 100644
--- a/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/SubscribeMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/kafka-plugin/src/main/java/org/apache/skywalking/apm/plugin/kafka/SubscribeMethodInterceptor.java
@@ -52,6 +52,6 @@ public class SubscribeMethodInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/AsyncCommandMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/AsyncCommandMethodInterceptor.java
index 951ec85..8bae48a 100644
--- a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/AsyncCommandMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/AsyncCommandMethodInterceptor.java
@@ -61,6 +61,6 @@ public class AsyncCommandMethodInterceptor implements InstanceMethodsAroundInter
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/RedisChannelWriterInterceptor.java b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/RedisChannelWriterInterceptor.java
index 46215bd..0037c56 100644
--- a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/RedisChannelWriterInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/RedisChannelWriterInterceptor.java
@@ -73,7 +73,6 @@ public class RedisChannelWriterInterceptor implements InstanceMethodsAroundInter
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWBiConsumer.java b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWBiConsumer.java
index 680c3b1..26aacbd 100644
--- a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWBiConsumer.java
+++ b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWBiConsumer.java
@@ -49,7 +49,7 @@ public class SWBiConsumer<T, U> implements BiConsumer<T, U> {
ContextManager.continued(snapshot);
biConsumer.accept(t, u);
} catch (Throwable th) {
- ContextManager.activeSpan().errorOccurred().log(th);
+ ContextManager.activeSpan().log(th);
} finally {
ContextManager.stopSpan();
}
diff --git a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWConsumer.java b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWConsumer.java
index 5a3392c..4454f1d 100644
--- a/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWConsumer.java
+++ b/apm-sniffer/apm-sdk-plugin/lettuce-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/lettuce/v5/SWConsumer.java
@@ -49,7 +49,7 @@ public class SWConsumer<T> implements Consumer<T> {
ContextManager.continued(snapshot);
consumer.accept(t);
} catch (Throwable th) {
- ContextManager.activeSpan().errorOccurred().log(th);
+ ContextManager.activeSpan().log(th);
} finally {
ContextManager.stopSpan();
}
diff --git a/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java b/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java
index 8cd7a46..09a035c 100644
--- a/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/light4j-plugins/light4j-plugin/src/main/java/org/apache/skywalking/apm/plugin/light4j/HandleRequestInterceptor.java
@@ -117,7 +117,7 @@ public class HandleRequestInterceptor implements InstanceMethodsAroundIntercepto
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private boolean isBusinessHandler(EnhancedInstance objInst) {
diff --git a/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/PreparedStatementExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/PreparedStatementExecuteMethodsInterceptor.java
index 9d7c219..195dca0 100644
--- a/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/PreparedStatementExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/PreparedStatementExecuteMethodsInterceptor.java
@@ -76,7 +76,7 @@ public class PreparedStatementExecuteMethodsInterceptor implements InstanceMetho
Class<?>[] argumentsTypes, Throwable t) {
StatementEnhanceInfos cacheObject = (StatementEnhanceInfos) objInst.getSkyWalkingDynamicField();
if (cacheObject.getConnectionInfo() != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/StatementExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/StatementExecuteMethodsInterceptor.java
index 8f636ce..87d55dd 100644
--- a/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/StatementExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mariadb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mariadb/v2/StatementExecuteMethodsInterceptor.java
@@ -63,7 +63,7 @@ public class StatementExecuteMethodsInterceptor implements InstanceMethodsAround
Class<?>[] argumentsTypes, Throwable t) {
StatementEnhanceInfos cacheObject = (StatementEnhanceInfos) objInst.getSkyWalkingDynamicField();
if (cacheObject.getConnectionInfo() != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/mongodb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v2/MongoDBCollectionMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/mongodb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v2/MongoDBCollectionMethodInterceptor.java
index a13a43f..3cf9988 100644
--- a/apm-sniffer/apm-sdk-plugin/mongodb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v2/MongoDBCollectionMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mongodb-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v2/MongoDBCollectionMethodInterceptor.java
@@ -78,7 +78,6 @@ public class MongoDBCollectionMethodInterceptor implements InstanceMethodsAround
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v30/MongoDBInterceptor.java b/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v30/MongoDBInterceptor.java
index 7ac199a..2d3196d 100644
--- a/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v30/MongoDBInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v30/MongoDBInterceptor.java
@@ -75,7 +75,6 @@ public class MongoDBInterceptor implements InstanceMethodsAroundInterceptor, Ins
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v37/MongoDBOperationExecutorInterceptor.java b/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v37/MongoDBOperationExecutorInterceptor.java
index fb4da5d..b49c23e 100644
--- a/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v37/MongoDBOperationExecutorInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/interceptor/v37/MongoDBOperationExecutorInterceptor.java
@@ -58,7 +58,6 @@ public class MongoDBOperationExecutorInterceptor implements InstanceMethodsAroun
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanConsumerInterceptor.java b/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanConsumerInterceptor.java
index b0ba10f..22e8638 100644
--- a/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanConsumerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanConsumerInterceptor.java
@@ -71,7 +71,6 @@ public class MotanConsumerInterceptor implements InstanceConstructorInterceptor,
Response response = (Response) ret;
if (response != null && response.getException() != null) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(response.getException());
}
ContextManager.stopSpan();
@@ -82,7 +81,6 @@ public class MotanConsumerInterceptor implements InstanceConstructorInterceptor,
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanProviderInterceptor.java b/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanProviderInterceptor.java
index 7b99d37..d799dfd 100644
--- a/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanProviderInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/motan-plugin/src/main/java/org/apache/skywalking/apm/plugin/motan/MotanProviderInterceptor.java
@@ -63,7 +63,6 @@ public class MotanProviderInterceptor implements InstanceMethodsAroundIntercepto
if (response != null && response.getException() != null) {
AbstractSpan span = ContextManager.activeSpan();
span.log(response.getException());
- span.errorOccurred();
}
ContextManager.stopSpan();
@@ -74,7 +73,6 @@ public class MotanProviderInterceptor implements InstanceMethodsAroundIntercepto
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/PreparedStatementExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/PreparedStatementExecuteMethodsInterceptor.java
index 2ae7b05..26c243a 100644
--- a/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/PreparedStatementExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/PreparedStatementExecuteMethodsInterceptor.java
@@ -84,7 +84,7 @@ public class PreparedStatementExecuteMethodsInterceptor implements InstanceMetho
Class<?>[] argumentsTypes, Throwable t) {
StatementEnhanceInfos cacheObject = (StatementEnhanceInfos) objInst.getSkyWalkingDynamicField();
if (cacheObject != null && cacheObject.getConnectionInfo() != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/StatementExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/StatementExecuteMethodsInterceptor.java
index cd642e0..57052d1 100644
--- a/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/StatementExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/mysql-common/src/main/java/org/apache/skywalking/apm/plugin/jdbc/mysql/StatementExecuteMethodsInterceptor.java
@@ -81,7 +81,7 @@ public class StatementExecuteMethodsInterceptor implements InstanceMethodsAround
Class<?>[] argumentsTypes, Throwable t) {
StatementEnhanceInfos cacheObject = (StatementEnhanceInfos) objInst.getSkyWalkingDynamicField();
if (cacheObject.getConnectionInfo() != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOConnectionInterceptor.java b/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOConnectionInterceptor.java
index f97c4d4..680810a 100644
--- a/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOConnectionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOConnectionInterceptor.java
@@ -60,7 +60,7 @@ public class NettySocketIOConnectionInterceptor implements InstanceMethodsAround
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java b/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java
index ca85984..e0bfdef 100644
--- a/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java
@@ -54,7 +54,7 @@ public class NettySocketIOOnEventInterceptor implements InstanceMethodsAroundInt
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIORoomInterceptor.java b/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIORoomInterceptor.java
index e05e39b..75d6f35 100644
--- a/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIORoomInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIORoomInterceptor.java
@@ -50,7 +50,7 @@ public class NettySocketIORoomInterceptor implements InstanceMethodsAroundInterc
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java
index d9201d7..af6fae6 100644
--- a/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java
@@ -76,6 +76,6 @@ public class SenderSendInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java
index 37695c1..143f39e 100644
--- a/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/nutz-plugins/mvc-annotation-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/mvc/ActionMethodInterceptor.java
@@ -85,6 +85,6 @@ public class ActionMethodInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/EnqueueInterceptor.java b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/EnqueueInterceptor.java
index 7f12e62..e4612a9 100644
--- a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/EnqueueInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/EnqueueInterceptor.java
@@ -62,7 +62,7 @@ public class EnqueueInterceptor implements InstanceMethodsAroundInterceptor, Ins
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
@Override
diff --git a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnFailureInterceptor.java b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnFailureInterceptor.java
index 0463fa7..be4b82d 100644
--- a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnFailureInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnFailureInterceptor.java
@@ -28,7 +28,7 @@ public class OnFailureInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
MethodInterceptResult result) throws Throwable {
- ContextManager.activeSpan().errorOccurred().log((Throwable) allArguments[1]);
+ ContextManager.activeSpan().log((Throwable) allArguments[1]);
}
@Override
@@ -40,6 +40,6 @@ public class OnFailureInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnResponseInterceptor.java
index abf91fa..4649d01 100644
--- a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/OnResponseInterceptor.java
@@ -49,6 +49,6 @@ public class OnResponseInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java
index 07113a3..56f99a4 100644
--- a/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/okhttp-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/okhttp/v3/RealCallInterceptor.java
@@ -112,7 +112,6 @@ public class RealCallInterceptor implements InstanceMethodsAroundInterceptor, In
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan abstractSpan = ContextManager.activeSpan();
- abstractSpan.errorOccurred();
abstractSpan.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java
index 3739004..41071de 100644
--- a/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/HttpFiltersInterceptor.java
@@ -55,7 +55,7 @@ public class HttpFiltersInterceptor implements InstanceMethodsAroundInterceptor,
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
@Override
diff --git a/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java
index 0bd29ce..32914b3 100644
--- a/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java
+++ b/apm-sniffer/apm-sdk-plugin/play-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/play/v2x/TracingFilter.java
@@ -85,7 +85,7 @@ public class TracingFilter extends Filter {
try {
span.asyncFinish();
} catch (Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
return result;
});
diff --git a/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/PreparedStatementExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/PreparedStatementExecuteMethodsInterceptor.java
index d359976..9045ad6 100755
--- a/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/PreparedStatementExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/PreparedStatementExecuteMethodsInterceptor.java
@@ -80,7 +80,7 @@ public class PreparedStatementExecuteMethodsInterceptor implements InstanceMetho
Class<?>[] argumentsTypes, Throwable t) {
StatementEnhanceInfos cacheObject = (StatementEnhanceInfos) objInst.getSkyWalkingDynamicField();
if (cacheObject.getConnectionInfo() != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/StatementExecuteMethodsInterceptor.java b/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/StatementExecuteMethodsInterceptor.java
index 7572315..c1a76ac 100755
--- a/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/StatementExecuteMethodsInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/postgresql-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdbc/postgresql/StatementExecuteMethodsInterceptor.java
@@ -63,7 +63,7 @@ public class StatementExecuteMethodsInterceptor implements InstanceMethodsAround
Class<?>[] argumentsTypes, Throwable t) {
StatementEnhanceInfos cacheObject = (StatementEnhanceInfos) objInst.getSkyWalkingDynamicField();
if (cacheObject.getConnectionInfo() != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarConsumerInterceptor.java b/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarConsumerInterceptor.java
index d76cce8..414296f 100644
--- a/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarConsumerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarConsumerInterceptor.java
@@ -83,7 +83,7 @@ public class PulsarConsumerInterceptor implements InstanceMethodsAroundIntercept
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (allArguments[0] != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarProducerInterceptor.java b/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarProducerInterceptor.java
index 75f2a6d..0161225 100644
--- a/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarProducerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/PulsarProducerInterceptor.java
@@ -104,7 +104,7 @@ public class PulsarProducerInterceptor implements InstanceMethodsAroundIntercept
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (allArguments[0] != null) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/SendCallbackInterceptor.java b/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/SendCallbackInterceptor.java
index c4e1c06..0209edf 100644
--- a/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/SendCallbackInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/pulsar-plugin/src/main/java/org/apache/skywalking/apm/plugin/pulsar/SendCallbackInterceptor.java
@@ -64,7 +64,7 @@ public class SendCallbackInterceptor implements InstanceMethodsAroundInterceptor
if (null != requiredInfo.getContextSnapshot()) {
Exception exceptions = (Exception) allArguments[0];
if (exceptions != null) {
- ContextManager.activeSpan().errorOccurred().log(exceptions);
+ ContextManager.activeSpan().log(exceptions);
}
ContextManager.stopSpan();
}
@@ -76,7 +76,7 @@ public class SendCallbackInterceptor implements InstanceMethodsAroundInterceptor
Class<?>[] argumentsTypes, Throwable t) {
SendCallbackEnhanceRequiredInfo requiredInfo = (SendCallbackEnhanceRequiredInfo) objInst.getSkyWalkingDynamicField();
if (null != requiredInfo.getContextSnapshot()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/FiberInterceptor.java b/apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/FiberInterceptor.java
index 744dd4d..d4df414 100644
--- a/apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/FiberInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/FiberInterceptor.java
@@ -55,7 +55,6 @@ public class FiberInterceptor implements InstanceMethodsAroundInterceptor, Insta
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQConsumerInterceptor.java b/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQConsumerInterceptor.java
index e5e687c..8c74a80 100644
--- a/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQConsumerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQConsumerInterceptor.java
@@ -73,6 +73,6 @@ public class RabbitMQConsumerInterceptor implements InstanceMethodsAroundInterce
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQProducerInterceptor.java b/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQProducerInterceptor.java
index 5ee7e71..a430283 100644
--- a/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQProducerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQProducerInterceptor.java
@@ -99,6 +99,6 @@ public class RabbitMQProducerInterceptor implements InstanceMethodsAroundInterce
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java
index f87b7bf..8f96cd0 100644
--- a/apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/redisson-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/redisson/v3/RedisConnectionMethodInterceptor.java
@@ -99,7 +99,6 @@ public class RedisConnectionMethodInterceptor implements InstanceMethodsAroundIn
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherExceptionInterceptor.java b/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherExceptionInterceptor.java
index 9234a95..a335238 100644
--- a/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherExceptionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherExceptionInterceptor.java
@@ -32,7 +32,7 @@ public class SynchronousDispatcherExceptionInterceptor implements InstanceMethod
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
MethodInterceptResult result) throws Throwable {
if (ContextManager.isActive() && !((HttpRequest) allArguments[0]).getAsyncContext().isSuspended()) {
- ContextManager.activeSpan().errorOccurred().log((Throwable) allArguments[2]);
+ ContextManager.activeSpan().log((Throwable) allArguments[2]);
}
}
@@ -45,6 +45,6 @@ public class SynchronousDispatcherExceptionInterceptor implements InstanceMethod
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java b/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java
index d028a04..78aff12 100644
--- a/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/resteasy-plugin/resteasy-server-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/resteasy/v3/server/SynchronousDispatcherInterceptor.java
@@ -70,7 +70,7 @@ public class SynchronousDispatcherInterceptor implements InstanceMethodsAroundIn
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private static String toPath(String uri) {
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/AbstractMessageConsumeInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/AbstractMessageConsumeInterceptor.java
index 3bb27df..72dfd0c 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/AbstractMessageConsumeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/AbstractMessageConsumeInterceptor.java
@@ -60,7 +60,7 @@ public abstract class AbstractMessageConsumeInterceptor implements InstanceMetho
@Override
public final void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private ContextCarrier getContextCarrierFromMessage(MessageExt message) {
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/MessageSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/MessageSendInterceptor.java
index 86a4bed..747b009 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/MessageSendInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/MessageSendInterceptor.java
@@ -91,7 +91,7 @@ public class MessageSendInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private String buildOperationName(String topicName) {
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnExceptionInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnExceptionInterceptor.java
index 374d569..b4ce320 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnExceptionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnExceptionInterceptor.java
@@ -41,7 +41,7 @@ public class OnExceptionInterceptor implements InstanceMethodsAroundInterceptor
SendCallBackEnhanceInfo enhanceInfo = (SendCallBackEnhanceInfo) objInst.getSkyWalkingDynamicField();
AbstractSpan activeSpan = ContextManager.createLocalSpan(CALLBACK_OPERATION_NAME_PREFIX + enhanceInfo.getTopicId() + "/Producer/Callback");
activeSpan.setComponent(ComponentsDefine.ROCKET_MQ_PRODUCER);
- activeSpan.errorOccurred().log((Throwable) allArguments[0]);
+ activeSpan.log((Throwable) allArguments[0]);
ContextManager.continued(enhanceInfo.getContextSnapshot());
}
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnSuccessInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnSuccessInterceptor.java
index baabd26..9689551 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnSuccessInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v3/OnSuccessInterceptor.java
@@ -62,6 +62,6 @@ public class OnSuccessInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java
index 23f2b00..61b3554 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/AbstractMessageConsumeInterceptor.java
@@ -60,7 +60,7 @@ public abstract class AbstractMessageConsumeInterceptor implements InstanceMetho
@Override
public final void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private ContextCarrier getContextCarrierFromMessage(MessageExt message) {
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java
index 4939658..8bd2e35 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/MessageSendInterceptor.java
@@ -91,7 +91,7 @@ public class MessageSendInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private String buildOperationName(String topicName) {
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnExceptionInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnExceptionInterceptor.java
index 4687f8c..cd6b12e 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnExceptionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnExceptionInterceptor.java
@@ -48,7 +48,7 @@ public class OnExceptionInterceptor implements InstanceMethodsAroundInterceptor
}
AbstractSpan activeSpan = ContextManager.createLocalSpan(CALLBACK_OPERATION_NAME_PREFIX + topicId + "/Producer/Callback");
activeSpan.setComponent(ComponentsDefine.ROCKET_MQ_PRODUCER);
- activeSpan.errorOccurred().log((Throwable) allArguments[0]);
+ activeSpan.log((Throwable) allArguments[0]);
if (enhanceInfo != null && enhanceInfo.getContextSnapshot() != null) {
ContextManager.continued(enhanceInfo.getContextSnapshot());
}
diff --git a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnSuccessInterceptor.java b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnSuccessInterceptor.java
index e71d724..1fc80c4 100644
--- a/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnSuccessInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/rocketMQ-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rocketMQ/v4/OnSuccessInterceptor.java
@@ -62,6 +62,6 @@ public class OnSuccessInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
index a7ce310..9f3e854 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/ProducerOperationHandlerInterceptor.java
@@ -69,7 +69,6 @@ public class ProducerOperationHandlerInterceptor implements InstanceMethodsAroun
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java
index e69e869..17ee3f8 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/TransportClientHandlerInterceptor.java
@@ -82,7 +82,6 @@ public class TransportClientHandlerInterceptor implements InstanceMethodsAroundI
return;
}
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java
index 2911628..80150c7 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/ProducerOperationHandlerInterceptor.java
@@ -69,7 +69,6 @@ public class ProducerOperationHandlerInterceptor implements InstanceMethodsAroun
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java
index fbd93d0..9686b5c 100644
--- a/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v1/TransportClientHandlerInterceptor.java
@@ -82,7 +82,6 @@ public class TransportClientHandlerInterceptor implements InstanceMethodsAroundI
return;
}
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-jdbc-1.5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/sjdbc/define/ExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-jdbc-1.5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/sjdbc/define/ExecuteInterceptor.java
index cdd8e66..f1d2f82 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-jdbc-1.5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/sjdbc/define/ExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-jdbc-1.5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/sjdbc/define/ExecuteInterceptor.java
@@ -51,6 +51,6 @@ public class ExecuteInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ExecuteInterceptor.java
index 8f6308e..5504d48 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ExecuteInterceptor.java
@@ -59,6 +59,6 @@ public class ExecuteInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/JDBCRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/JDBCRootInvokeInterceptor.java
index ce7d528..6b2cc2d 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/JDBCRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/JDBCRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class JDBCRootInvokeInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ParseInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ParseInterceptor.java
index 93c9cde..fefe5cd 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ParseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ParseInterceptor.java
@@ -52,6 +52,6 @@ public class ParseInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ProxyRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ProxyRootInvokeInterceptor.java
index c1ba48d..18649ee 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ProxyRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/ProxyRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class ProxyRootInvokeInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ExecuteInterceptor.java
index 4528183..38aba47 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ExecuteInterceptor.java
@@ -59,6 +59,6 @@ public class ExecuteInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/JDBCRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/JDBCRootInvokeInterceptor.java
index fad49e3..183709f 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/JDBCRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/JDBCRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class JDBCRootInvokeInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ParseInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ParseInterceptor.java
index 9859f50..dea4396 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ParseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ParseInterceptor.java
@@ -52,6 +52,6 @@ public class ParseInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ProxyRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ProxyRootInvokeInterceptor.java
index 4f416f6..d8bab91 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ProxyRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v40/ProxyRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class ProxyRootInvokeInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ExecuteInterceptor.java
index 72fa54b..97f4377 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ExecuteInterceptor.java
@@ -59,6 +59,6 @@ public class ExecuteInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/JDBCRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/JDBCRootInvokeInterceptor.java
index d468d97..d9b74b1 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/JDBCRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/JDBCRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class JDBCRootInvokeInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ParseInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ParseInterceptor.java
index 875f6bb..13d9aa7 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ParseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ParseInterceptor.java
@@ -51,6 +51,6 @@ public class ParseInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ProxyRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ProxyRootInvokeInterceptor.java
index 35e30e8..7d5f7fe 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ProxyRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.1.0-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v41/ProxyRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class ProxyRootInvokeInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ExecuteInterceptor.java
index b4baeaa..1666611 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ExecuteInterceptor.java
@@ -59,6 +59,6 @@ public class ExecuteInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/JDBCRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/JDBCRootInvokeInterceptor.java
index 1364a04..999d4e0 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/JDBCRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/JDBCRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class JDBCRootInvokeInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ParseInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ParseInterceptor.java
index 66d410e..c2c36fc 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ParseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ParseInterceptor.java
@@ -52,6 +52,6 @@ public class ParseInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ProxyRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ProxyRootInvokeInterceptor.java
index c45e17c..692c2b6 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ProxyRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-RC3-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4rc3/ProxyRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class ProxyRootInvokeInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ExecuteInterceptor.java
index c67a74c..7ebd168 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ExecuteInterceptor.java
@@ -59,6 +59,6 @@ public class ExecuteInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/JDBCRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/JDBCRootInvokeInterceptor.java
index 9e684ab..3625895 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/JDBCRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/JDBCRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class JDBCRootInvokeInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ParseInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ParseInterceptor.java
index 12a120c..aa72170 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ParseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ParseInterceptor.java
@@ -52,6 +52,6 @@ public class ParseInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ProxyRootInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ProxyRootInvokeInterceptor.java
index 2142bd1..1f2771a 100644
--- a/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ProxyRootInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sharding-sphere-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/shardingsphere/v4/ProxyRootInvokeInterceptor.java
@@ -51,6 +51,6 @@ public class ProxyRootInvokeInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcConsumerInterceptor.java b/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcConsumerInterceptor.java
index abbf99e..5758586 100644
--- a/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcConsumerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcConsumerInterceptor.java
@@ -90,7 +90,6 @@ public class SofaRpcConsumerInterceptor implements InstanceMethodsAroundIntercep
*/
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
diff --git a/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcProviderInterceptor.java b/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcProviderInterceptor.java
index 39f3e22..9839701 100644
--- a/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcProviderInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/sofarpc-plugin/src/main/java/org/apache/skywalking/apm/plugin/sofarpc/SofaRpcProviderInterceptor.java
@@ -84,7 +84,6 @@ public class SofaRpcProviderInterceptor implements InstanceMethodsAroundIntercep
*/
private void dealException(Throwable throwable) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(throwable);
}
diff --git a/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrClientInterceptor.java b/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrClientInterceptor.java
index ab55f91..720545b 100644
--- a/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrClientInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrClientInterceptor.java
@@ -182,7 +182,7 @@ public class SolrClientInterceptor implements InstanceMethodsAroundInterceptor,
code = ((SolrException) t).code();
}
span.tag(SolrjTags.TAG_STATUS, String.valueOf(code));
- span.errorOccurred().log(t);
+ span.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrConnectorInterceptor.java b/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrConnectorInterceptor.java
index 1e43d08..43e7875 100644
--- a/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrConnectorInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/solrj-7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/solrj/SolrConnectorInterceptor.java
@@ -57,7 +57,7 @@ public class SolrConnectorInterceptor implements InstanceMethodsAroundIntercepto
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/async-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/async/SWCallable.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/async-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/async/SWCallable.java
index f8f10a1..e8676d3 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/async-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/async/SWCallable.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/async-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/async/SWCallable.java
@@ -46,7 +46,7 @@ public class SWCallable<V> implements Callable<V> {
ContextManager.continued(snapshot);
return callable.call();
} catch (Exception e) {
- ContextManager.activeSpan().errorOccurred().log(e);
+ ContextManager.activeSpan().log(e);
throw e;
} finally {
ContextManager.stopSpan();
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/FailureCallbackInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/FailureCallbackInterceptor.java
index d4c9e7f..c62ee17 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/FailureCallbackInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/FailureCallbackInterceptor.java
@@ -37,8 +37,7 @@ public class FailureCallbackInterceptor implements InstanceMethodsAroundIntercep
}
AbstractSpan span = ContextManager.createLocalSpan("future/failureCallback:" + cacheValues.getOperationName());
- span.errorOccurred()
- .log((Throwable) allArguments[0])
+ span.log((Throwable) allArguments[0])
.setComponent(cacheValues.getComponent())
.setLayer(cacheValues.getSpanLayer());
ContextManager.continued(cacheValues.getContextSnapshot());
@@ -62,6 +61,6 @@ public class FailureCallbackInterceptor implements InstanceMethodsAroundIntercep
if (cacheValues == null) {
return;
}
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/SuccessCallbackInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/SuccessCallbackInterceptor.java
index 6057212..4055cbc 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/SuccessCallbackInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/concurrent-util-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/concurrent/SuccessCallbackInterceptor.java
@@ -59,6 +59,6 @@ public class SuccessCallbackInterceptor implements InstanceMethodsAroundIntercep
if (cacheValues == null) {
return;
}
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
index 9015ef8..5dda244 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-commons/src/main/java/org/apache/skywalking/apm/plugin/spring/mvc/commons/interceptor/AbstractMethodInterceptor.java
@@ -205,7 +205,7 @@ public abstract class AbstractMethodInterceptor implements InstanceMethodsAround
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private void collectHttpParam(RequestHolder request, AbstractSpan span) {
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/FutureGetInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/FutureGetInterceptor.java
index e9bea41..03975d4 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/FutureGetInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/FutureGetInterceptor.java
@@ -46,6 +46,6 @@ public class FutureGetInterceptor implements InstanceMethodsAroundInterceptor {
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred().log(t);
+ activeSpan.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/RestExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/RestExecuteInterceptor.java
index a46650c..2b87d9e 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/RestExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/async/RestExecuteInterceptor.java
@@ -74,6 +74,6 @@ public class RestExecuteInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestExecuteInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestExecuteInterceptor.java
index 0941d90..294e9f0 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestExecuteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestExecuteInterceptor.java
@@ -63,6 +63,6 @@ public class RestExecuteInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java
index 041b7a0..bc2b35e 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/resttemplate-4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/resttemplate/sync/RestResponseInterceptor.java
@@ -52,6 +52,6 @@ public class RestResponseInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/scheduled-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/scheduled/ScheduledMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/scheduled-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/scheduled/ScheduledMethodInterceptor.java
index d6def65..77b371e 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/scheduled-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/scheduled/ScheduledMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/scheduled-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/scheduled/ScheduledMethodInterceptor.java
@@ -52,6 +52,6 @@ public class ScheduledMethodInterceptor implements InstanceMethodsAroundIntercep
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java
index 6cf1af0..af1d2f5 100644
--- a/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spymemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spymemcached/v2/MemcachedMethodInterceptor.java
@@ -62,7 +62,6 @@ public class MemcachedMethodInterceptor implements InstanceMethodsAroundIntercep
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java b/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java
index 4f5fa1a..1fc63b0 100644
--- a/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/struts2-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/struts2/Struts2Interceptor.java
@@ -80,6 +80,6 @@ public class Struts2Interceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java
index de71eff..28c8a9a 100644
--- a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java
@@ -28,7 +28,7 @@ public class TomcatExceptionInterceptor implements InstanceMethodsAroundIntercep
@Override
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
MethodInterceptResult result) throws Throwable {
- ContextManager.activeSpan().errorOccurred().log((Throwable) allArguments[2]);
+ ContextManager.activeSpan().log((Throwable) allArguments[2]);
}
@Override
diff --git a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
index 7c897fd..851dd41 100644
--- a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
@@ -111,7 +111,6 @@ public class TomcatInvokeInterceptor implements InstanceMethodsAroundInterceptor
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
span.log(t);
- span.errorOccurred();
}
private void collectHttpParam(Request request, AbstractSpan span) {
diff --git a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/ListenerConfigInterceptor.java b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/ListenerConfigInterceptor.java
index 0d30e68..1744672 100644
--- a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/ListenerConfigInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/ListenerConfigInterceptor.java
@@ -53,7 +53,7 @@ public class ListenerConfigInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RootHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RootHandlerInterceptor.java
index bde3682..f90570f 100644
--- a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RootHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RootHandlerInterceptor.java
@@ -48,7 +48,7 @@ public class RootHandlerInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RoutingHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RoutingHandlerInterceptor.java
index 51217bf..734daf1 100644
--- a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RoutingHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/RoutingHandlerInterceptor.java
@@ -47,7 +47,7 @@ public class RoutingHandlerInterceptor implements InstanceMethodsAroundIntercept
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java
index e3bd641..8bf79f5 100644
--- a/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java
+++ b/apm-sniffer/apm-sdk-plugin/undertow-plugins/undertow-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/undertow/v2x/handler/TracingHandler.java
@@ -83,7 +83,7 @@ public class TracingHandler implements HttpHandler {
try {
next.handleRequest(exchange);
} catch (Throwable e) {
- span.errorOccurred().log(e);
+ span.log(e);
} finally {
ContextManager.stopSpan(span);
ContextManager.getRuntimeContext().remove(Constants.FORWARD_REQUEST_FLAG);
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ClusteredEventBusSendRemoteInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ClusteredEventBusSendRemoteInterceptor.java
index 47e0a20..0aa11f6 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ClusteredEventBusSendRemoteInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ClusteredEventBusSendRemoteInterceptor.java
@@ -78,6 +78,6 @@ public class ClusteredEventBusSendRemoteInterceptor implements InstanceMethodsAr
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/EventBusImplDeliverToHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/EventBusImplDeliverToHandlerInterceptor.java
index 8e32945..eac7361 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/EventBusImplDeliverToHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/EventBusImplDeliverToHandlerInterceptor.java
@@ -76,6 +76,6 @@ public class EventBusImplDeliverToHandlerInterceptor implements InstanceMethodsA
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HandlerRegistrationInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HandlerRegistrationInterceptor.java
index ff8db51..55a1434 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HandlerRegistrationInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HandlerRegistrationInterceptor.java
@@ -90,6 +90,6 @@ public class HandlerRegistrationInterceptor implements InstanceMethodsAroundInte
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleExceptionInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleExceptionInterceptor.java
index ef58d44..1e94fee 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleExceptionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleExceptionInterceptor.java
@@ -31,7 +31,7 @@ public class HttpClientRequestImplHandleExceptionInterceptor implements Instance
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
MethodInterceptResult result) throws Throwable {
VertxContext context = (VertxContext) objInst.getSkyWalkingDynamicField();
- context.getSpan().errorOccurred().log((Throwable) allArguments[0]);
+ context.getSpan().log((Throwable) allArguments[0]);
}
@Override
@@ -43,6 +43,6 @@ public class HttpClientRequestImplHandleExceptionInterceptor implements Instance
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java
index de6bfb7..d1ed6fa 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java
@@ -66,6 +66,6 @@ public class HttpClientRequestImplHandleResponseInterceptor implements InstanceM
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplInterceptor.java
index 08cf2ab..d28c9f1 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplInterceptor.java
@@ -110,7 +110,7 @@ public class HttpClientRequestImplInterceptor implements InstanceMethodsAroundIn
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private static String toPath(String uri) {
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java
index 7b9f3a9..3629a0c 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextHandleDispatchResponseInterceptor.java
@@ -61,6 +61,6 @@ public class HttpContextHandleDispatchResponseInterceptor implements InstanceMet
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextSendRequestInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextSendRequestInterceptor.java
index a90dd43..399962d 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextSendRequestInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpContextSendRequestInterceptor.java
@@ -45,6 +45,6 @@ public class HttpContextSendRequestInterceptor implements InstanceMethodsAroundI
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplHandleExceptionInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplHandleExceptionInterceptor.java
index fd45615..766a034 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplHandleExceptionInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplHandleExceptionInterceptor.java
@@ -31,7 +31,7 @@ public class HttpServerResponseImplHandleExceptionInterceptor implements Instanc
public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
MethodInterceptResult result) throws Throwable {
VertxContext context = (VertxContext) objInst.getSkyWalkingDynamicField();
- context.getSpan().errorOccurred().log((Throwable) allArguments[0]);
+ context.getSpan().log((Throwable) allArguments[0]);
}
@Override
@@ -43,6 +43,6 @@ public class HttpServerResponseImplHandleExceptionInterceptor implements Instanc
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java
index 83bb689..c68ead8 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplInterceptor.java
@@ -57,6 +57,6 @@ public class HttpServerResponseImplInterceptor implements InstanceMethodsAroundI
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java
index e2ceb79..1df2e75 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteImplHandlerInterceptor.java
@@ -45,6 +45,6 @@ public class RouteImplHandlerInterceptor implements InstanceMethodsAroundInterce
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java
index 159d614..1a13879 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/RouteStateInterceptor.java
@@ -112,6 +112,6 @@ public class RouteStateInterceptor implements InstanceMethodsAroundInterceptor,
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ServerConnectionHandleMessageInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ServerConnectionHandleMessageInterceptor.java
index 1afbb4e..8e30951 100644
--- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ServerConnectionHandleMessageInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/ServerConnectionHandleMessageInterceptor.java
@@ -69,7 +69,7 @@ public class ServerConnectionHandleMessageInterceptor implements InstanceMethods
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private static String toPath(String uri) {
diff --git a/apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java
index da7ea3a..daf2915 100644
--- a/apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/xmemcached-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/xmemcached/v2/XMemcachedMethodInterceptor.java
@@ -59,7 +59,6 @@ public class XMemcachedMethodInterceptor implements InstanceMethodsAroundInterce
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/ActiveSpanErrorThrowableInteceptor.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/ActiveSpanErrorThrowableInteceptor.java
index 709dba6..48dcde7 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/ActiveSpanErrorThrowableInteceptor.java
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/ActiveSpanErrorThrowableInteceptor.java
@@ -32,7 +32,6 @@ public class ActiveSpanErrorThrowableInteceptor implements StaticMethodsAroundIn
AbstractSpan activeSpan = null;
try {
activeSpan = ContextManager.activeSpan();
- activeSpan.errorOccurred();
activeSpan.log((Throwable) allArguments[0]);
} catch (NullPointerException e) {
}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/CallableOrRunnableInvokeInterceptor.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/CallableOrRunnableInvokeInterceptor.java
index b4f66d8..7d3a6fe 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/CallableOrRunnableInvokeInterceptor.java
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/CallableOrRunnableInvokeInterceptor.java
@@ -48,6 +48,6 @@ public class CallableOrRunnableInvokeInterceptor implements InstanceMethodsAroun
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/IgnoredExceptionAnnotationActivation.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/IgnoredExceptionAnnotationActivation.java
new file mode 100644
index 0000000..a505d7c
--- /dev/null
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/IgnoredExceptionAnnotationActivation.java
@@ -0,0 +1,65 @@
+/*
+ * 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.apm.toolkit.activation.trace;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+
+import static net.bytebuddy.matcher.ElementMatchers.any;
+import static org.apache.skywalking.apm.agent.core.plugin.match.ClassAnnotationMatch.byClassAnnotationMatch;
+
+/**
+ * Intercepts all exception annotated with {@link org.apache.skywalking.apm.toolkit.trace.IgnoredException}
+ */
+public class IgnoredExceptionAnnotationActivation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ public static final String ANNOTATION_NAME = "org.apache.skywalking.apm.toolkit.trace.IgnoredException";
+ private static final String INIT_METHOD_INTERCEPTOR = "org.apache.skywalking.apm.toolkit.activation.trace.IgnoredExceptionConstructInterceptor";
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[] {
+ new ConstructorInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getConstructorMatcher() {
+ return any();
+ }
+
+ @Override
+ public String getConstructorInterceptor() {
+ return INIT_METHOD_INTERCEPTOR;
+ }
+ }
+ };
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return null;
+ }
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return byClassAnnotationMatch(new String[] {ANNOTATION_NAME});
+ }
+}
diff --git a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/IgnoredExceptionConstructInterceptor.java
similarity index 52%
copy from apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java
copy to apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/IgnoredExceptionConstructInterceptor.java
index de71eff..37dbbf5 100644
--- a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatExceptionInterceptor.java
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/IgnoredExceptionConstructInterceptor.java
@@ -13,33 +13,24 @@
* 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.apm.plugin.tomcat78x;
+package org.apache.skywalking.apm.toolkit.activation.trace;
-import java.lang.reflect.Method;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.status.AnnotationMatchExceptionCheckStrategy;
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
-import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
-import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
-public class TomcatExceptionInterceptor implements InstanceMethodsAroundInterceptor {
- @Override
- public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
- MethodInterceptResult result) throws Throwable {
- ContextManager.activeSpan().errorOccurred().log((Throwable) allArguments[2]);
- }
+public class IgnoredExceptionConstructInterceptor implements InstanceConstructorInterceptor {
+ /**
+ * Inject a tag field to mark the exception should be not thought error status.
+ */
@Override
- public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes,
- Object ret) throws Throwable {
- return ret;
- }
-
- @Override
- public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
- Class<?>[] argumentsTypes, Throwable t) {
-
+ public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
+ if (ContextManager.isActive()) {
+ objInst.setSkyWalkingDynamicField(AnnotationMatchExceptionCheckStrategy.class.getSimpleName());
+ }
}
}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationMethodInterceptor.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationMethodInterceptor.java
index fcb701c..50ef219 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationMethodInterceptor.java
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TagAnnotationMethodInterceptor.java
@@ -89,7 +89,7 @@ public class TagAnnotationMethodInterceptor implements InstanceMethodsAroundInte
public void handleMethodException(final EnhancedInstance objInst, final Method method, final Object[] allArguments,
final Class<?>[] argumentsTypes, final Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TraceAnnotationMethodInterceptor.java b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TraceAnnotationMethodInterceptor.java
index eaf8b90..e11a1f7 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TraceAnnotationMethodInterceptor.java
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/java/org/apache/skywalking/apm/toolkit/activation/trace/TraceAnnotationMethodInterceptor.java
@@ -96,6 +96,6 @@ public class TraceAnnotationMethodInterceptor implements InstanceMethodsAroundIn
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
index 0f70650..002b9a6 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
+++ b/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
@@ -18,4 +18,5 @@ toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.ActiveSpanActiv
toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceContextActivation
toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.CallableOrRunnableActivation
-toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
\ No newline at end of file
+toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
+toolkit-exception=org.apache.skywalking.apm.toolkit.activation.trace.IgnoredExceptionAnnotationActivation
\ No newline at end of file
diff --git a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java
index b2f2d3c..a409ad2 100644
--- a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java
+++ b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientParseHttpInterceptor.java
@@ -56,7 +56,7 @@ public class HttpClientParseHttpInterceptor implements InstanceMethodsAroundInte
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred().log(t);
+ span.log(t);
}
/**
diff --git a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientWriteRequestInterceptor.java b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientWriteRequestInterceptor.java
index c041a47..37d6677 100644
--- a/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientWriteRequestInterceptor.java
+++ b/apm-sniffer/bootstrap-plugins/jdk-http-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/http/HttpClientWriteRequestInterceptor.java
@@ -66,7 +66,7 @@ public class HttpClientWriteRequestInterceptor implements InstanceMethodsAroundI
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred().log(t);
+ span.log(t);
}
private String getPeer(URL url) {
diff --git a/apm-sniffer/bootstrap-plugins/jdk-threading-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/threading/ThreadingMethodInterceptor.java b/apm-sniffer/bootstrap-plugins/jdk-threading-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/threading/ThreadingMethodInterceptor.java
index 587b105..6cf0107 100644
--- a/apm-sniffer/bootstrap-plugins/jdk-threading-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/threading/ThreadingMethodInterceptor.java
+++ b/apm-sniffer/bootstrap-plugins/jdk-threading-plugin/src/main/java/org/apache/skywalking/apm/plugin/jdk/threading/ThreadingMethodInterceptor.java
@@ -62,7 +62,7 @@ public class ThreadingMethodInterceptor implements InstanceMethodsAroundIntercep
final Class<?>[] argumentsTypes, final Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/config/agent.config b/apm-sniffer/config/agent.config
index d6fdf85..fdf4699 100644
--- a/apm-sniffer/config/agent.config
+++ b/apm-sniffer/config/agent.config
@@ -85,6 +85,13 @@ logging.level=${SW_LOGGING_LEVEL:INFO}
# then the oldest file will be delete. Negative or zero means off, by default.
# logging.max_history_files=${SW_LOGGING_MAX_HISTORY_FILES:-1}
+# Listed exceptions would not be treated as an error. Because in some codes, the exception is being used as a way of controlling business flow.
+# Besides, the annotation named IgnoredException in the trace toolkit is another way to configure ignored exceptions.
+# statuscheck.ignored_exceptions=${SW_STATUSCHECK_IGNORED_EXCEPTIONS:}
+
+# The max recursive depth when checking the exception traced by the agent. Typically, we don't recommend setting this more than 10, which could cause a performance issue. Negative value and 0 would be ignored, which means all exceptions would make the span tagged in error status.
+# statuscheck.max_recursive_depth=${SW_STATUSCHECK_MAX_RECURSIVE_DEPTH:1}
+
# mysql plugin configuration
# plugin.mysql.trace_sql_parameters=${SW_MYSQL_TRACE_SQL_PARAMETERS:false}
diff --git a/apm-sniffer/optional-plugins/customize-enhance-plugin/src/main/java/org/apache/skywalking/apm/plugin/customize/interceptor/BaseInterceptorMethods.java b/apm-sniffer/optional-plugins/customize-enhance-plugin/src/main/java/org/apache/skywalking/apm/plugin/customize/interceptor/BaseInterceptorMethods.java
index e7fb236..e8edcbe 100644
--- a/apm-sniffer/optional-plugins/customize-enhance-plugin/src/main/java/org/apache/skywalking/apm/plugin/customize/interceptor/BaseInterceptorMethods.java
+++ b/apm-sniffer/optional-plugins/customize-enhance-plugin/src/main/java/org/apache/skywalking/apm/plugin/customize/interceptor/BaseInterceptorMethods.java
@@ -90,7 +90,7 @@ class BaseInterceptorMethods {
void handleMethodException(Throwable t) {
if (ContextManager.isActive()) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonFromJsonInterceptor.java b/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonFromJsonInterceptor.java
index 3112878..4ab53c5 100644
--- a/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonFromJsonInterceptor.java
+++ b/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonFromJsonInterceptor.java
@@ -51,6 +51,6 @@ public class GsonFromJsonInterceptor implements InstanceMethodsAroundInterceptor
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
\ No newline at end of file
diff --git a/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonToJsonInterceptor.java b/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonToJsonInterceptor.java
index da4fabb..d7e2cc8 100644
--- a/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonToJsonInterceptor.java
+++ b/apm-sniffer/optional-plugins/gson-2.8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/gson/GsonToJsonInterceptor.java
@@ -51,6 +51,6 @@ public class GsonToJsonInterceptor implements InstanceMethodsAroundInterceptor {
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java
index c63a3fa..8509eb6 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/HttpClientRequestInterceptor.java
@@ -87,7 +87,7 @@ public class HttpClientRequestInterceptor implements InstanceMethodsAroundInterc
AbstractSpan abstractSpan = enhanceCacheObject.getSendSpan();
if (abstractSpan != null) {
if (throwable != null) {
- abstractSpan.errorOccurred().log(throwable);
+ abstractSpan.log(throwable);
} else if (httpClientResponse.status().code() > 400) {
abstractSpan.errorOccurred();
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/NettyRoutingFilterInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/NettyRoutingFilterInterceptor.java
index 776723b..27d0375 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/NettyRoutingFilterInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.0.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v20x/NettyRoutingFilterInterceptor.java
@@ -66,6 +66,6 @@ public class NettyRoutingFilterInterceptor implements InstanceMethodsAroundInter
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/NettyRoutingFilterInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/NettyRoutingFilterInterceptor.java
index a9035d6..616a23b 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/NettyRoutingFilterInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-2.1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v21x/NettyRoutingFilterInterceptor.java
@@ -64,6 +64,6 @@ public class NettyRoutingFilterInterceptor implements InstanceMethodsAroundInter
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationInterceptor.java
index 60c5702..51cd351 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationInterceptor.java
@@ -45,6 +45,6 @@ public class SpringAnnotationInterceptor implements InstanceMethodsAroundInterce
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/EndTransactionMethodInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/EndTransactionMethodInterceptor.java
index 6bd4700..e4aefee 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/EndTransactionMethodInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/EndTransactionMethodInterceptor.java
@@ -52,6 +52,6 @@ public class EndTransactionMethodInterceptor implements InstanceMethodsAroundInt
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/GetTransactionMethodInterceptor.java b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/GetTransactionMethodInterceptor.java
index bb9cfa1..b4cf3d7 100644
--- a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/GetTransactionMethodInterceptor.java
+++ b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-tx-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/transaction/GetTransactionMethodInterceptor.java
@@ -59,7 +59,7 @@ public class GetTransactionMethodInterceptor implements InstanceMethodsAroundInt
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private String buildOperationName(String transactionDefinitionName) {
diff --git a/apm-sniffer/optional-plugins/quartz-scheduler-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/quartz/JobRunShellMethodInterceptor.java b/apm-sniffer/optional-plugins/quartz-scheduler-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/quartz/JobRunShellMethodInterceptor.java
index dba5070..465a7fe 100644
--- a/apm-sniffer/optional-plugins/quartz-scheduler-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/quartz/JobRunShellMethodInterceptor.java
+++ b/apm-sniffer/optional-plugins/quartz-scheduler-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/quartz/JobRunShellMethodInterceptor.java
@@ -67,7 +67,7 @@ public class JobRunShellMethodInterceptor implements InstanceMethodsAroundInterc
@Override
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
private static String getJobDataMapString(JobDetail jobDetail) {
diff --git a/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/ClientCnxnInterceptor.java b/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/ClientCnxnInterceptor.java
index 0da36cf..9e0ac25 100644
--- a/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/ClientCnxnInterceptor.java
+++ b/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/ClientCnxnInterceptor.java
@@ -68,7 +68,6 @@ public class ClientCnxnInterceptor implements InstanceMethodsAroundInterceptor,
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
AbstractSpan span = ContextManager.activeSpan();
- span.errorOccurred();
span.log(t);
}
diff --git a/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/EventThreadMethodInterceptor.java b/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/EventThreadMethodInterceptor.java
index c9ce30c..0895627 100644
--- a/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/EventThreadMethodInterceptor.java
+++ b/apm-sniffer/optional-plugins/zookeeper-3.4.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/zookeeper/EventThreadMethodInterceptor.java
@@ -60,7 +60,7 @@ public class EventThreadMethodInterceptor implements InstanceMethodsAroundInterc
public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Throwable t) {
if (isWatchedEvent(allArguments[0])) {
- ContextManager.activeSpan().errorOccurred().log(t);
+ ContextManager.activeSpan().log(t);
}
}
diff --git a/docs/en/setup/service-agent/java-agent/How-to-tolerate-exceptions.md b/docs/en/setup/service-agent/java-agent/How-to-tolerate-exceptions.md
new file mode 100644
index 0000000..e80f73c
--- /dev/null
+++ b/docs/en/setup/service-agent/java-agent/How-to-tolerate-exceptions.md
@@ -0,0 +1,114 @@
+# How to tolerate custom exceptions
+*In some codes, the exception is being used as a way of controlling business flow. Skywalking provides 2 ways to tolerate an exception which is traced in a span.*
+1. Set the names of exception classes in the agent config
+2. Use our annotation in the codes.
+
+## Set the names of exception classes in the agent config
+The property named "statuscheck.ignored_exceptions" is used to set up class names in the agent configuration file. if the exception listed here are detected in the agent, the agent core would flag the related span as the error status.
+
+### Demo
+1. A custom exception.
+
+ - TestNamedMatchException
+ ```java
+ package org.apache.skywalking.apm.agent.core.context.status;
+
+ public class TestNamedMatchException extends RuntimeException {
+ public TestNamedMatchException() {
+ }
+ public TestNamedMatchException(final String message) {
+ super(message);
+ }
+ ...
+ }
+ ```
+ - TestHierarchyMatchException
+ ```java
+ package org.apache.skywalking.apm.agent.core.context.status;
+
+ public class TestHierarchyMatchException extends TestNamedMatchException {
+ public TestHierarchyMatchException() {
+ }
+ public TestHierarchyMatchException(final String message) {
+ super(message);
+ }
+ ...
+ }
+ ```
+2. When the above exceptions traced in some spans, the status is like the following.
+
+ The traced exception | Final span status |
+ ----------- | ---------- |
+ `org.apache.skywalking.apm.agent.core.context.status.TestNamedMatchException` | true |
+ `org.apache.skywalking.apm.agent.core.context.status.TestHierarchyMatchException` | true |
+3. After set these class names through "statuscheck.ignored_exceptions", the status of spans would be changed.
+
+ ```
+ statuscheck.ignored_exceptions=org.apache.skywalking.apm.agent.core.context.status.TestNamedMatchException
+ ```
+
+ The traced exception | Final span status |
+ ----------- | ---------- |
+ `org.apache.skywalking.apm.agent.core.context.status.TestNamedMatchException` | false |
+ `org.apache.skywalking.apm.agent.core.context.status.TestHierarchyMatchException` | false |
+
+## Use our annotation in the codes.
+If an exception has the `@IgnoredException` annotation, the exception wouldn't be marked as error status when tracing. Because the annotation supports inheritance, also affects the subclasses.
+
+### Dependency
+* Dependency the toolkit, such as using maven or gradle. Since 8.2.0.
+```xml
+ <dependency>
+ <groupId>org.apache.skywalking</groupId>
+ <artifactId>apm-toolkit-log4j-1.x</artifactId>
+ <version>{project.release.version}</version>
+ </dependency>
+```
+### Demo
+ 1. A custom exception.
+
+ ```java
+ package org.apache.skywalking.apm.agent.core.context.status;
+
+ public class TestAnnotatedException extends RuntimeException {
+ public TestAnnotatedException() {
+ }
+ public TestAnnotatedException(final String message) {
+ super(message);
+ }
+ ...
+ }
+ ```
+ 2. When the above exception traced in some spans, the status is like the following.
+
+ The traced exception | Final span status |
+ ----------- | ---------- |
+ `org.apache.skywalking.apm.agent.core.context.status.TestAnnotatedException` | true |
+
+ 3. However, when the exception annotated with the annotation, the status would be changed.
+
+ ```java
+ package org.apache.skywalking.apm.agent.core.context.status;
+
+ @IgnoredException
+ public class TestAnnotatedException extends RuntimeException {
+
+ public TestAnnotatedException() {
+ }
+ public TestAnnotatedException(final String message) {
+ super(message);
+ }
+ ...
+ }
+ ```
+
+ The traced exception | Final span status |
+ ----------- | ---------- |
+ `org.apache.skywalking.apm.agent.core.context.status.TestAnnotatedException` | false |
+
+## Recursive check
+Due to the wrapper nature of Java exceptions, sometimes users need recursive checking. Skywalking also supports it. Typically, we don't recommend setting this more than 10, which could cause a performance issue. Negative value and 0 would be ignored, which means all exceptions would make the span tagged in error status.
+
+```
+ statuscheck.max_recursive_depth=${SW_STATUSCHECK_MAX_RECURSIVE_DEPTH:1}
+```
diff --git a/docs/en/setup/service-agent/java-agent/Plugin-list.md b/docs/en/setup/service-agent/java-agent/Plugin-list.md
index d20ef38..8a12894 100644
--- a/docs/en/setup/service-agent/java-agent/Plugin-list.md
+++ b/docs/en/setup/service-agent/java-agent/Plugin-list.md
@@ -99,6 +99,7 @@
- toolkit-opentracing
- toolkit-tag
- toolkit-trace
+- toolkit-exception
- undertow-2.x-plugin
- vertx-core-3.x
- zookeeper-3.4.x
\ No newline at end of file
diff --git a/docs/en/setup/service-agent/java-agent/README.md b/docs/en/setup/service-agent/java-agent/README.md
index c5c0447..ab09956 100755
--- a/docs/en/setup/service-agent/java-agent/README.md
+++ b/docs/en/setup/service-agent/java-agent/README.md
@@ -100,6 +100,8 @@ property key | Description | Default |
`logging.pattern `|Logging format. There are all conversion specifiers: <br> * `%level` means log level. <br> * `%timestamp` means now of time with format `yyyy-MM-dd HH:mm:ss:SSS`.<br> * `%thread` means name of current thread.<br> * `%msg` means some message which user logged. <br> * `%class` means SimpleName of TargetClass. <br> * `%throwable` means a throwable which user called. <br> * `%agent_name` m [...]
`logging.max_file_size`|The max size of log file. If the size is bigger than this, archive the current file, and write into a new file.|`300 * 1024 * 1024`|
`logging.max_history_files`|The max history log files. When rollover happened, if log files exceed this number,then the oldest file will be delete. Negative or zero means off, by default.|`-1`|
+`statuscheck.ignored_exceptions`|Listed exceptions would not be treated as an error. Because in some codes, the exception is being used as a way of controlling business flow.|`""`|
+`statuscheck.max_recursive_depth`|The max recursive depth when checking the exception traced by the agent. Typically, we don't recommend setting this more than 10, which could cause a performance issue. Negative value and 0 would be ignored, which means all exceptions would make the span tagged in error status.|`1`|
`jvm.buffer_size`|The buffer size of collected JVM info.|`60 * 10`|
`buffer.channel_size`|The buffer channel size.|`5`|
`buffer.buffer_size`|The buffer size.|`300`|
@@ -155,7 +157,6 @@ property key | Description | Default |
`plugin.kafka.topic_management` | Specify which Kafka topic name for the register or heartbeat data of Service Instance to report to. | `skywalking_managements` |
`plugin.springannotation.classname_match_regex` | Match spring beans with regular expression for the class name. Multiple expressions could be separated by a comma. This only works when `Spring annotation plugin` has been activated. | `All the spring beans tagged with @Bean,@Service,@Dao, or @Repository.` |
-
## Optional Plugins
Java agent plugins are all pluggable. Optional plugins could be provided in `optional-plugins` folder under agent or 3rd party repositories.
For using these plugins, you need to put the target plugin jar file into `/plugins`.
@@ -194,6 +195,7 @@ Now, we have the following known bootstrap plugins.
* If you want to continue traces across thread manually, use [across thread solution APIs](Application-toolkit-trace-cross-thread.md).
* If you want to forward MicroMeter/Spring Sleuth metrics to Meter System, use [SkyWalking MicroMeter Register](Application-toolkit-micrometer.md).
* If you want to use OpenTracing Java APIs, try [SkyWalking OpenTracing compatible tracer](Opentracing.md). More details you could find at http://opentracing.io
+ * If you want to tolerate some exceptions, read [tolerate custom exception doc](How-to-tolerate-exceptions.md).
* If you want to specify the path of your agent.config file. Read [set config file through system properties](Specified-agent-config.md)
## Advanced Reporters
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def b/test/plugin/scenarios/exception-checker-spring-scenario/bin/startup.sh
similarity index 63%
copy from apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
copy to test/plugin/scenarios/exception-checker-spring-scenario/bin/startup.sh
index 0f70650..660475a 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/bin/startup.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+#
# 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
@@ -14,8 +16,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.ActiveSpanActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceContextActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.CallableOrRunnableActivation
-toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
\ No newline at end of file
+home="$(cd "$(dirname $0)"; pwd)"
+
+java -jar ${agent_opts} -Dskywalking.statuscheck.max_recursive_depth=2 -Dskywalking.statuscheck.ignored_exceptions=test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException ${home}/../libs/exception-checker-spring-scenario.jar &
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/config/expectedData.yaml b/test/plugin/scenarios/exception-checker-spring-scenario/config/expectedData.yaml
new file mode 100644
index 0000000..c2fccb3
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/config/expectedData.yaml
@@ -0,0 +1,148 @@
+# 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.
+segmentItems:
+ - serviceName: exception-checker-spring-scenario
+ segmentSize: 2
+ segments:
+ - segmentId: not null
+ spans:
+ - operationName: /case/healthCheck
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 14
+ isError: false
+ spanType: Entry
+ peer: ''
+ skipAnalysis: false
+ tags:
+ - {key: url, value: 'http://localhost:8080/exception-checker-spring/case/healthCheck'}
+ - {key: http.method, value: HEAD}
+ - segmentId: not null
+ spans:
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testAnnotatedException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 1
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestAnnotatedException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testListedException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 2
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testHierarchyListedException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 3
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestHierarchyListedException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 4
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: true
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testRecursiveException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 5
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestException}
+ - {key: message, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException}
+ - key: stack
+ value: not null
+ - operationName: /case/exceptionchecker
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 14
+ isError: false
+ spanType: Entry
+ peer: ''
+ skipAnalysis: false
+ tags:
+ - {key: url, value: 'http://localhost:8080/exception-checker-spring/case/exceptionchecker'}
+ - {key: http.method, value: GET}
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def b/test/plugin/scenarios/exception-checker-spring-scenario/configuration.yml
similarity index 63%
copy from apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
copy to test/plugin/scenarios/exception-checker-spring-scenario/configuration.yml
index 0f70650..9d95f9e 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/configuration.yml
@@ -14,8 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.ActiveSpanActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceContextActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.CallableOrRunnableActivation
-toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
\ No newline at end of file
+type: jvm
+entryService: http://localhost:8080/exception-checker-spring/case/exceptionchecker
+healthCheck: http://localhost:8080/exception-checker-spring/case/healthCheck
+startScript: ./bin/startup.sh
+runningMode: with_optional
+withPlugins: apm-spring-annotation-plugin-*.jar
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/pom.xml b/test/plugin/scenarios/exception-checker-spring-scenario/pom.xml
new file mode 100644
index 0000000..47fb833
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/pom.xml
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <groupId>org.apache.skywalking.apm.testcase</groupId>
+ <artifactId>exception-checker-spring-scenario</artifactId>
+ <version>1.0.0</version>
+ <packaging>jar</packaging>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <compiler.version>1.8</compiler.version>
+ <test.framework.version>YOUR VERSION</test.framework.version>
+ <spring-boot-version>2.1.6.RELEASE</spring-boot-version>
+ <lombok.version>1.18.10</lombok.version>
+ </properties>
+
+ <name>skywalking-exception-checker-spring</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-dependencies</artifactId>
+ <version>${spring-boot-version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-log4j2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <version>${lombok.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>exception-checker-spring-scenario</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${compiler.version}</source>
+ <target>${compiler.version}</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>assemble</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/assembly.xml</descriptor>
+ </descriptors>
+ <outputDirectory>./target/</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/assembly/assembly.xml b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/assembly/assembly.xml
new file mode 100644
index 0000000..e863f2a
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/assembly/assembly.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~
+ -->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <directory>./bin</directory>
+ <fileMode>0775</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <files>
+ <file>
+ <source>${project.build.directory}/exception-checker-spring-scenario.jar</source>
+ <outputDirectory>./libs</outputDirectory>
+ <fileMode>0775</fileMode>
+ </file>
+ </files>
+</assembly>
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java
new file mode 100644
index 0000000..372c250
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java
@@ -0,0 +1,35 @@
+/*
+ * 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.apm.toolkit.trace;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * After the exception status checker activated in the agent, the span wouldn't be marked as error status if the
+ * exception has this annotation.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface IgnoredException {
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/Application.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/Application.java
new file mode 100644
index 0000000..a9fec45
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/Application.java
@@ -0,0 +1,34 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+
+ public static void main(String[] args) {
+ try {
+ SpringApplication.run(Application.class, args);
+ } catch (Exception e) {
+ // Never do this
+ }
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/controller/CaseController.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/controller/CaseController.java
new file mode 100644
index 0000000..cb6f3af
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/controller/CaseController.java
@@ -0,0 +1,79 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.controller;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService;
+
+@RestController
+@RequestMapping("/case")
+@Log4j2
+public class CaseController {
+
+ private final TestService service;
+
+ private static final String SUCCESS = "Success";
+
+ @Autowired
+ public CaseController(final TestService service) {
+ this.service = service;
+ }
+
+ @RequestMapping("/exceptionchecker")
+ @ResponseBody
+ public String testcase() {
+ try {
+ service.testAnnotatedException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testListedException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testHierarchyListedException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testRecursiveException();
+ } catch (Exception ignore) {
+ }
+ return SUCCESS;
+ }
+
+ @RequestMapping("/healthCheck")
+ @ResponseBody
+ public String healthCheck() {
+ // your codes
+ return SUCCESS;
+ }
+
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestAnnotatedException.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestAnnotatedException.java
new file mode 100644
index 0000000..70def46
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestAnnotatedException.java
@@ -0,0 +1,47 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+import org.apache.skywalking.apm.toolkit.trace.IgnoredException;
+
+@IgnoredException
+public class TestAnnotatedException extends RuntimeException {
+
+ public TestAnnotatedException() {
+ }
+
+ public TestAnnotatedException(final String message) {
+ super(message);
+ }
+
+ public TestAnnotatedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestAnnotatedException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestAnnotatedException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestException.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestException.java
new file mode 100644
index 0000000..4118da2
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestException extends RuntimeException {
+
+ public TestException() {
+ }
+
+ public TestException(final String message) {
+ super(message);
+ }
+
+ public TestException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestHierarchyListedException.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestHierarchyListedException.java
new file mode 100644
index 0000000..6f6b55c
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestHierarchyListedException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestHierarchyListedException extends TestListedException {
+
+ public TestHierarchyListedException() {
+ }
+
+ public TestHierarchyListedException(final String message) {
+ super(message);
+ }
+
+ public TestHierarchyListedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestHierarchyListedException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestHierarchyListedException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestListedException.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestListedException.java
new file mode 100644
index 0000000..9095970
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestListedException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestListedException extends RuntimeException {
+
+ public TestListedException() {
+ }
+
+ public TestListedException(final String message) {
+ super(message);
+ }
+
+ public TestListedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestListedException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestListedException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/service/TestService.java b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/service/TestService.java
new file mode 100644
index 0000000..d8632dd
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/service/TestService.java
@@ -0,0 +1,50 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.service;
+
+import org.springframework.stereotype.Service;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestAnnotatedException;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestException;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestHierarchyListedException;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException;
+
+@Service
+public class TestService {
+
+ public String testAnnotatedException() {
+ throw new TestAnnotatedException();
+ }
+
+ public String testException() {
+ throw new TestException();
+ }
+
+ public String testListedException() {
+ throw new TestListedException();
+ }
+
+ public String testHierarchyListedException() {
+ throw new TestHierarchyListedException();
+ }
+
+ public String testRecursiveException() {
+ throw new TestException(new TestListedException());
+ }
+
+}
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/resources/application.yaml b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/resources/application.yaml
new file mode 100644
index 0000000..a1de850
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/resources/application.yaml
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+#
+server:
+ port: 8080
+ servlet:
+ context-path: /exception-checker-spring
+logging:
+ config: classpath:log4j2.xml
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-spring-scenario/src/main/resources/log4j2.xml b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9849ed5
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~
+ -->
+<Configuration status="WARN">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_ERR">
+ <PatternLayout charset="UTF-8" pattern="[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Root level="WARN">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def b/test/plugin/scenarios/exception-checker-spring-scenario/support-version.list
similarity index 59%
copy from apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
copy to test/plugin/scenarios/exception-checker-spring-scenario/support-version.list
index 0f70650..1130513 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
+++ b/test/plugin/scenarios/exception-checker-spring-scenario/support-version.list
@@ -2,7 +2,7 @@
# 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
+# to you under the Apache License, Version
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@@ -14,8 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.ActiveSpanActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceContextActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.CallableOrRunnableActivation
-toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
\ No newline at end of file
+# lists your version here
+1.0.0
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/config/expectedData.yaml b/test/plugin/scenarios/exception-checker-tomcat-scenario/config/expectedData.yaml
new file mode 100644
index 0000000..890365b
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/config/expectedData.yaml
@@ -0,0 +1,132 @@
+# 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.
+segmentItems:
+ - serviceName: exception-checker-tomcat-scenario
+ segmentSize: gt 1
+ segments:
+ - segmentId: not null
+ spans:
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testAnnotatedException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 1
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestAnnotatedException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testListedException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 2
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testHierarchyListedException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 3
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestHierarchyListedException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 4
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: true
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestException}
+ - {key: message, value: ''}
+ - key: stack
+ value: not null
+ - operationName: test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService.testRecursiveException
+ operationId: 0
+ parentSpanId: 0
+ spanId: 5
+ spanLayer: Unknown
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 93
+ isError: false
+ spanType: Local
+ peer: ''
+ skipAnalysis: false
+ logs:
+ - logEvent:
+ - {key: event, value: error}
+ - {key: error.kind, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestException}
+ - {key: message, value: test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException}
+ - key: stack
+ value: not null
+ - operationName: /case/exceptionchecker
+ operationId: 0
+ parentSpanId: -1
+ spanId: 0
+ spanLayer: Http
+ startTime: nq 0
+ endTime: nq 0
+ componentId: 14
+ isError: false
+ spanType: Entry
+ peer: ''
+ skipAnalysis: false
+ tags:
+ - {key: url, value: 'http://localhost:8080/exception-checker-tomcat-scenario/case/exceptionchecker'}
+ - {key: http.method, value: GET}
+
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def b/test/plugin/scenarios/exception-checker-tomcat-scenario/configuration.yml
similarity index 59%
copy from apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
copy to test/plugin/scenarios/exception-checker-tomcat-scenario/configuration.yml
index 0f70650..0a55c08 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/configuration.yml
@@ -14,8 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.ActiveSpanActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceContextActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.CallableOrRunnableActivation
-toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
\ No newline at end of file
+type: tomcat
+entryService: http://localhost:8080/exception-checker-tomcat-scenario/case/exceptionchecker
+healthCheck: http://localhost:8080/exception-checker-tomcat-scenario/case/healthCheck
+runningMode: with_optional
+withPlugins: apm-spring-annotation-plugin-*.jar
+environment:
+ - CATALINA_OPTS="-Dskywalking.statuscheck.max_recursive_depth=2 -Dskywalking.statuscheck.max_recursive_depth=2 -Dskywalking.statuscheck.ignored_exceptions=test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException"
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/pom.xml b/test/plugin/scenarios/exception-checker-tomcat-scenario/pom.xml
new file mode 100644
index 0000000..813f35e
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/pom.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <groupId>org.apache.skywalking.apm.testcase</groupId>
+ <artifactId>exception-checker-tomcat-scenario</artifactId>
+ <version>1.0.0</version>
+ <packaging>war</packaging>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>skywalking-exception-checker-tomcat-scenario</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <compiler.version>1.8</compiler.version>
+ <lombok.version>1.18.10</lombok.version>
+ <spring.framework.version>4.3.0.RELEASE</spring.framework.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>2.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <version>${lombok.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.framework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${spring.framework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.framework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${spring.framework.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>exception-checker-tomcat-scenario</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${compiler.version}</source>
+ <target>${compiler.version}</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java
new file mode 100644
index 0000000..372c250
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/org/apache/skywalking/apm/toolkit/trace/IgnoredException.java
@@ -0,0 +1,35 @@
+/*
+ * 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.apm.toolkit.trace;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * After the exception status checker activated in the agent, the span wouldn't be marked as error status if the
+ * exception has this annotation.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface IgnoredException {
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/controller/CaseController.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/controller/CaseController.java
new file mode 100644
index 0000000..cb6f3af
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/controller/CaseController.java
@@ -0,0 +1,79 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.controller;
+
+import lombok.extern.log4j.Log4j2;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.service.TestService;
+
+@RestController
+@RequestMapping("/case")
+@Log4j2
+public class CaseController {
+
+ private final TestService service;
+
+ private static final String SUCCESS = "Success";
+
+ @Autowired
+ public CaseController(final TestService service) {
+ this.service = service;
+ }
+
+ @RequestMapping("/exceptionchecker")
+ @ResponseBody
+ public String testcase() {
+ try {
+ service.testAnnotatedException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testListedException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testHierarchyListedException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testException();
+ } catch (Exception ignore) {
+ }
+
+ try {
+ service.testRecursiveException();
+ } catch (Exception ignore) {
+ }
+ return SUCCESS;
+ }
+
+ @RequestMapping("/healthCheck")
+ @ResponseBody
+ public String healthCheck() {
+ // your codes
+ return SUCCESS;
+ }
+
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestAnnotatedException.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestAnnotatedException.java
new file mode 100644
index 0000000..70def46
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestAnnotatedException.java
@@ -0,0 +1,47 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+import org.apache.skywalking.apm.toolkit.trace.IgnoredException;
+
+@IgnoredException
+public class TestAnnotatedException extends RuntimeException {
+
+ public TestAnnotatedException() {
+ }
+
+ public TestAnnotatedException(final String message) {
+ super(message);
+ }
+
+ public TestAnnotatedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestAnnotatedException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestAnnotatedException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestException.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestException.java
new file mode 100644
index 0000000..4118da2
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestException extends RuntimeException {
+
+ public TestException() {
+ }
+
+ public TestException(final String message) {
+ super(message);
+ }
+
+ public TestException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestHierarchyListedException.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestHierarchyListedException.java
new file mode 100644
index 0000000..6f6b55c
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestHierarchyListedException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestHierarchyListedException extends TestListedException {
+
+ public TestHierarchyListedException() {
+ }
+
+ public TestHierarchyListedException(final String message) {
+ super(message);
+ }
+
+ public TestHierarchyListedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestHierarchyListedException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestHierarchyListedException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestListedException.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestListedException.java
new file mode 100644
index 0000000..9095970
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestListedException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestListedException extends RuntimeException {
+
+ public TestListedException() {
+ }
+
+ public TestListedException(final String message) {
+ super(message);
+ }
+
+ public TestListedException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestListedException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestListedException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestOtherClassLoaderException.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestOtherClassLoaderException.java
new file mode 100644
index 0000000..3df6698
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/exception/TestOtherClassLoaderException.java
@@ -0,0 +1,44 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.exception;
+
+public class TestOtherClassLoaderException extends RuntimeException{
+
+ public TestOtherClassLoaderException() {
+ }
+
+ public TestOtherClassLoaderException(final String message) {
+ super(message);
+ }
+
+ public TestOtherClassLoaderException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public TestOtherClassLoaderException(final Throwable cause) {
+ super(cause);
+ }
+
+ public TestOtherClassLoaderException(final String message,
+ final Throwable cause,
+ final boolean enableSuppression,
+ final boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/service/TestService.java b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/service/TestService.java
new file mode 100644
index 0000000..d8632dd
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/java/test/org/apache/skywalking/apm/testcase/exceptionchecker/service/TestService.java
@@ -0,0 +1,50 @@
+/*
+ * 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 test.org.apache.skywalking.apm.testcase.exceptionchecker.service;
+
+import org.springframework.stereotype.Service;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestAnnotatedException;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestException;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestHierarchyListedException;
+import test.org.apache.skywalking.apm.testcase.exceptionchecker.exception.TestListedException;
+
+@Service
+public class TestService {
+
+ public String testAnnotatedException() {
+ throw new TestAnnotatedException();
+ }
+
+ public String testException() {
+ throw new TestException();
+ }
+
+ public String testListedException() {
+ throw new TestListedException();
+ }
+
+ public String testHierarchyListedException() {
+ throw new TestHierarchyListedException();
+ }
+
+ public String testRecursiveException() {
+ throw new TestException(new TestListedException());
+ }
+
+}
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/resources/log4j2.xml b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..9849ed5
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/resources/log4j2.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~
+ -->
+<Configuration status="WARN">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_ERR">
+ <PatternLayout charset="UTF-8" pattern="[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <Root level="WARN">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/webapp/WEB-INF/spring-mvc-servlet.xml b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/webapp/WEB-INF/spring-mvc-servlet.xml
new file mode 100644
index 0000000..10222c8
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/webapp/WEB-INF/spring-mvc-servlet.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ ~
+ -->
+
+<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.0.xsd
+ http://www.springframework.org/schema/mvc
+ http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
+ <context:component-scan base-package="test.org.apache.skywalking.apm.testcase"/>
+ <mvc:annotation-driven/>
+</beans>
\ No newline at end of file
diff --git a/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/webapp/WEB-INF/web.xml b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..9fecabc
--- /dev/null
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,34 @@
+<!--
+ ~ 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.
+ ~
+ -->
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
+ version="3.1">
+ <display-name>skywalking-exception-checker-tomcat-scenario</display-name>
+
+ <servlet>
+ <servlet-name>spring-mvc</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>spring-mvc</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+</web-app>
diff --git a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def b/test/plugin/scenarios/exception-checker-tomcat-scenario/support-version.list
similarity index 59%
copy from apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
copy to test/plugin/scenarios/exception-checker-tomcat-scenario/support-version.list
index 0f70650..1130513 100644
--- a/apm-sniffer/apm-toolkit-activation/apm-toolkit-trace-activation/src/main/resources/skywalking-plugin.def
+++ b/test/plugin/scenarios/exception-checker-tomcat-scenario/support-version.list
@@ -2,7 +2,7 @@
# 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
+# to you under the Apache License, Version
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@@ -14,8 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.ActiveSpanActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.TraceContextActivation
-toolkit-trace=org.apache.skywalking.apm.toolkit.activation.trace.CallableOrRunnableActivation
-toolkit-tag=org.apache.skywalking.apm.toolkit.activation.trace.TagAnnotationActivation
\ No newline at end of file
+# lists your version here
+1.0.0
\ No newline at end of file
diff --git a/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml b/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml
index d92679a..4a46b52 100644
--- a/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml
+++ b/test/plugin/scenarios/grpc-scenario/config/expectedData.yaml
@@ -406,7 +406,7 @@ segmentItems:
startTime: nq 0
endTime: nq 0
componentId: 23
- isError: false
+ isError: true
spanType: Local
peer: ''
logs: