();
- // }
- }
-
public static class Light4J {
/**
* If true, trace all middleware/business handlers that are part of the Light4J handler chain for a request,
diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/OperationNameFormatService.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/OperationNameFormatService.java
deleted file mode 100644
index 210201f3f0..0000000000
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/OperationNameFormatService.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * 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;
-
-import java.lang.reflect.Field;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-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.agent.core.conf.OPGroupDefinition;
-import org.apache.skywalking.apm.util.StringFormatGroup;
-
-/**
- * Support operation name format by config. Every plugin could declare its own rule to avoid performance concerns.
- *
- * Right now, the rule is REGEX based, it definitely has much space to optimize, because basically, only `*` is required
- * to be supported.
- */
-@DefaultImplementor
-public class OperationNameFormatService implements BootService {
- private static final Map RULES = new ConcurrentHashMap();
-
- @Override
- public void prepare() throws Throwable {
- for (Class> ruleName : Config.Plugin.OPGroup.class.getClasses()) {
- if (!OPGroupDefinition.class.isAssignableFrom(ruleName)) {
- continue;
- }
- StringFormatGroup formatGroup = RULES.get(ruleName);
- if (formatGroup == null) {
- formatGroup = new StringFormatGroup();
- RULES.put(ruleName, formatGroup);
- }
- for (Field ruleNameField : ruleName.getFields()) {
- if (ruleNameField.getType().equals(Map.class)) {
- Map rule = (Map) ruleNameField.get(null);
- for (Map.Entry entry : rule.entrySet()) {
- formatGroup.addRule(entry.getKey(), entry.getValue());
- }
- }
- }
- }
- }
-
- @Override
- public void boot() {
-
- }
-
- @Override
- public void onComplete() {
-
- }
-
- @Override
- public void shutdown() {
-
- }
-
- /**
- * Format the operation name based on group rules
- *
- * @param definition in the Config
- * @param opName represents the operation name literal string
- * @return format string if rule matched or the given opName
- */
- public String formatOperationName(Class extends OPGroupDefinition> definition, String opName) {
- StringFormatGroup formatGroup = RULES.get(definition);
- if (formatGroup == null) {
- return opName;
- } else {
- return formatGroup.format(opName).getName();
- }
- }
-}
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 da40cdf211..7c630a921f 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
@@ -25,6 +25,5 @@ org.apache.skywalking.apm.agent.core.remote.ServiceManagementClient
org.apache.skywalking.apm.agent.core.context.ContextManagerExtendService
org.apache.skywalking.apm.agent.core.commands.CommandService
org.apache.skywalking.apm.agent.core.commands.CommandExecutorService
-org.apache.skywalking.apm.agent.core.context.OperationNameFormatService
org.apache.skywalking.apm.agent.core.profile.ProfileTaskChannelService
org.apache.skywalking.apm.agent.core.profile.ProfileTaskExecutionService
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 ae56a74089..a8eb079777 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
@@ -57,7 +57,7 @@ public class ServiceManagerTest {
public void testServiceDependencies() throws Exception {
HashMap registryService = getFieldValue(ServiceManager.INSTANCE, "bootedServices");
- assertThat(registryService.size(), is(12));
+ assertThat(registryService.size(), is(11));
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/TracingContextTest.java b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/TracingContextTest.java
index dcea1cf6d6..e4e1243e4b 100644
--- a/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/TracingContextTest.java
+++ b/apm-sniffer/apm-agent-core/src/test/java/org/apache/skywalking/apm/agent/core/context/TracingContextTest.java
@@ -18,15 +18,21 @@
package org.apache.skywalking.apm.agent.core.context;
+import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
import org.apache.skywalking.apm.agent.core.conf.Config;
import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.test.tools.AgentServiceRule;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
+import org.junit.Rule;
import org.junit.Test;
public class TracingContextTest {
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
@BeforeClass
public static void beforeClass() {
Config.Agent.KEEP_TRACING = true;
@@ -35,6 +41,7 @@ public class TracingContextTest {
@AfterClass
public static void afterClass() {
Config.Agent.KEEP_TRACING = false;
+ ServiceManager.INSTANCE.shutdown();
}
@Test
diff --git a/docs/en/setup/service-agent/java-agent/README.md b/docs/en/setup/service-agent/java-agent/README.md
index f55260dbd2..0c53d0c133 100755
--- a/docs/en/setup/service-agent/java-agent/README.md
+++ b/docs/en/setup/service-agent/java-agent/README.md
@@ -169,9 +169,6 @@ Now, we have the following known bootstrap plugins.
SkyWalking java agent supports plugin to extend [the supported list](Supported-list.md). Please follow
our [Plugin Development Guide](../../../guides/Java-Plugin-Development-Guide.md).
-If some RPC framework endpoints(server side) could include parameter, please read [Operation Name Group Rule](op_name_group_rule.md),
-and consider to add this feature.
-
# Test
If you are interested in plugin compatible tests or agent performance, see the following reports.
* [Plugin Test in every Pull Request](https://github.com/apache/skywalking/actions?query=workflow%3APluginsTest)
diff --git a/docs/en/setup/service-agent/java-agent/op_name_group_rule.md b/docs/en/setup/service-agent/java-agent/op_name_group_rule.md
deleted file mode 100644
index 6deaca2c0d..0000000000
--- a/docs/en/setup/service-agent/java-agent/op_name_group_rule.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Operation Name Group Rule
-Operation Name in auto instrumentation agent is unpredictable, some time, target application carries parameter in it, due to the parameter included in URI mostly.
-Those operation name are also as known endpoint name in most cases.
-Such as /api/checkTicket/tk/{userToken}.
-
-We solved most of these cases, by leverage the parameter pattern path in framework, such as SpringMVC, Webflux, etc.
-In this case, it is undetected in this way, so we have to ask the users to set the group rule manually.
-
-All rules are supported to set through agent.config, system properties and system env, like other agent settings.
-- Config format, `plugin.opgroup.`plugin name`.rule[`rule name`]`=pattern regex expression
-
-Multiple configuration items for a single plugin with different keys are supports, such as
-1. plugin.opgroup.resttemplate.rule[/rule1]=/path1
-1. plugin.opgroup.resttemplate.rule[/rule2]=/path2
-1. plugin.opgroup.resttemplate.rule[/rule2]=/path3
-
-We have following plugins supporting operation name group.
-
-| Plugin | Config Key | Example |
-|:----:|:-----:|:----|
-|RestTemplate| plugin.opgroup.resttemplate.rule | plugin.opgroup.resttemplate.rule[/user/auth/{token}]=`\/user\/auth\/.*` |
diff --git a/skywalking-ui b/skywalking-ui
index b0e47262fa..919e932401 160000
--- a/skywalking-ui
+++ b/skywalking-ui
@@ -1 +1 @@
-Subproject commit b0e47262fa76b39b8fe58bff1f737892e84e7709
+Subproject commit 919e9324012fc601f8d4f5f4fac0602c5a561265