You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/09/01 15:24:56 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #5416: Exception-ignore-plugin & Support segment status based on entry/first span only

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



##########
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:
       I don't think we discussed this implementation before. Don't make 2 features in one PR.
   
   This implementation should be discussed on the mail list, because, you should notice, the `span#occurError` could be called separately, such as based on HTTP response code. This logic could override it incorrectly, if `HTTP response code == 500` and `exception occurs`.




----------------------------------------------------------------
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:
users@infra.apache.org