EvanLjp commented on a change in pull request #5416:
URL: https://github.com/apache/skywalking/pull/5416#discussion_r481252936



##########
File path: 
apm-sniffer/optional-plugins/exception-ignore-plugin/src/main/java/org/apache/skywalking/apm/plugin/exception/ignore/ExceptionIgnorerService.java
##########
@@ -0,0 +1,92 @@
+/*
+ * 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.plugin.exception.ignore;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.reflect.ClassPath;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+import org.apache.skywalking.apm.agent.core.boot.OverrideImplementor;
+import 
org.apache.skywalking.apm.agent.core.context.DefaultExceptionIgnorerService;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.plugin.PluginBootstrap;
+import org.apache.skywalking.apm.toolkit.trace.IgnoredException;
+import org.apache.skywalking.apm.util.StringUtil;
+
+import static 
org.apache.skywalking.apm.plugin.exception.ignore.ExceptionAnalyzerConfig.Plugin.IgnoredException.IGNORED_EXCEPTION_CLASS_NAMES;
+import static 
org.apache.skywalking.apm.plugin.exception.ignore.ExceptionAnalyzerConfig.Plugin.IgnoredException.IGNORED_EXCEPTION_SCAN_SCOPE;
+
+@OverrideImplementor(DefaultExceptionIgnorerService.class)
+public class ExceptionIgnorerService extends DefaultExceptionIgnorerService {

Review comment:
       now logic is only adjust status when throw ignore exception, 
   first we define 2 kinds of exception. IgnoreException and OtherException
   1. if response code is 500 and don't  throw exception ,the final status is 
error.
   2. if response code is 500  and throw OtherException,the final status is 
errror.
   3.  if response code is 500  and throw IgnoreException,the final status is 
not error. 
   for example in spring mvc, maybe throw exception would be cause response 
code is 500, if the exception could be ignored,the span final staus would be 
not error
   
   i would push a new pr about the feature
   
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

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


Reply via email to