Skip to content

Commit 5f61c5e

Browse files
authored
Optimize spring-cloud-gateway 2.1.x, 3.x witness class. (#610)
1 parent e6f12b5 commit 5f61c5e

7 files changed

Lines changed: 9 additions & 5 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Release Notes.
1111
* Fix an issue with the httpasyncclient component where the isError state is incorrect.
1212
* Support customization for the length limitation of string configurations
1313
* Add max length configurations in `agent.config` file for service_name and instance_name
14+
* Optimize spring-cloud-gateway 2.1.x, 3.x witness class.
1415

1516
#### Documentation
1617

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/define/AbstractGateway210EnhancePluginDefine.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public abstract class AbstractGateway210EnhancePluginDefine extends ClassInstanc
2424
@Override
2525
protected String[] witnessClasses() {
2626
return new String[] {
27+
"org.springframework.cloud.gateway.filter.LoadBalancerClientFilter",
2728
"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"
2829
};
2930
}

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/define/DispatcherHandlerInstrumentation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class DispatcherHandlerInstrumentation extends org.apache.skywalking.apm.
2323
@Override
2424
protected String[] witnessClasses() {
2525
return new String[] {
26+
"org.springframework.cloud.gateway.filter.LoadBalancerClientFilter",
2627
"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"
2728
};
2829
}

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/define/ServerWebExchangeInstrumentation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class ServerWebExchangeInstrumentation extends org.apache.skywalking.apm.
2323
@Override
2424
protected String[] witnessClasses() {
2525
return new String[] {
26+
"org.springframework.cloud.gateway.filter.LoadBalancerClientFilter",
2627
"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"
2728
};
2829
}

apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/define/AbstractGatewayV3EnhancePluginDefine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ public abstract class AbstractGatewayV3EnhancePluginDefine extends ClassInstance
2727

2828
@Override
2929
protected String[] witnessClasses() {
30-
return new String[]{"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"};
30+
return new String[]{"org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties"};
3131
}
3232
}

apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/define/DispatcherHandlerInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/**
2222
* This class is used for enable {@link org.apache.skywalking.apm.plugin.spring.webflux.v5.define.DispatcherHandlerInstrumentation}
23-
* class when {@link org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor} class is exist
23+
* class when {@link org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties} class is exist
2424
*/
2525
public class DispatcherHandlerInstrumentation extends
2626
org.apache.skywalking.apm.plugin.spring.webflux.v5.define.DispatcherHandlerInstrumentation {
2727

2828
@Override
2929
protected String[] witnessClasses() {
30-
return new String[]{"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"};
30+
return new String[]{"org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties"};
3131
}
3232
}

apm-sniffer/optional-plugins/optional-spring-plugins/optional-spring-cloud/gateway-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/cloud/gateway/v3x/define/ServerWebExchangeInstrumentation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
/**
2222
* This class is used for enable {@link org.apache.skywalking.apm.plugin.spring.webflux.v5.define.ServerWebExchangeInstrumentation}
23-
* when {@link org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor} class is exist.
23+
* when {@link org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties} class is exist.
2424
*/
2525
public class ServerWebExchangeInstrumentation extends
2626
org.apache.skywalking.apm.plugin.spring.webflux.v5.define.ServerWebExchangeInstrumentation {
2727

2828
@Override
2929
protected String[] witnessClasses() {
30-
return new String[]{"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"};
30+
return new String[]{"org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties"};
3131
}
3232
}

0 commit comments

Comments
 (0)