Optimize spring-cloud-gateway 2.1.x, 3.x witness class. (#610)

This commit is contained in:
weixiang1862 2023-09-15 14:39:48 +08:00 committed by GitHub
parent e6f12b5a7a
commit 5f61c5e31d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 5 deletions

View File

@ -11,6 +11,7 @@ Release Notes.
* Fix an issue with the httpasyncclient component where the isError state is incorrect.
* Support customization for the length limitation of string configurations
* Add max length configurations in `agent.config` file for service_name and instance_name
* Optimize spring-cloud-gateway 2.1.x, 3.x witness class.
#### Documentation

View File

@ -24,6 +24,7 @@ public abstract class AbstractGateway210EnhancePluginDefine extends ClassInstanc
@Override
protected String[] witnessClasses() {
return new String[] {
"org.springframework.cloud.gateway.filter.LoadBalancerClientFilter",
"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"
};
}

View File

@ -23,6 +23,7 @@ public class DispatcherHandlerInstrumentation extends org.apache.skywalking.apm.
@Override
protected String[] witnessClasses() {
return new String[] {
"org.springframework.cloud.gateway.filter.LoadBalancerClientFilter",
"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"
};
}

View File

@ -23,6 +23,7 @@ public class ServerWebExchangeInstrumentation extends org.apache.skywalking.apm.
@Override
protected String[] witnessClasses() {
return new String[] {
"org.springframework.cloud.gateway.filter.LoadBalancerClientFilter",
"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"
};
}

View File

@ -27,6 +27,6 @@ public abstract class AbstractGatewayV3EnhancePluginDefine extends ClassInstance
@Override
protected String[] witnessClasses() {
return new String[]{"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"};
return new String[]{"org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties"};
}
}

View File

@ -20,13 +20,13 @@ package org.apache.skywalking.apm.plugin.spring.cloud.gateway.v3x.define;
/**
* This class is used for enable {@link org.apache.skywalking.apm.plugin.spring.webflux.v5.define.DispatcherHandlerInstrumentation}
* class when {@link org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor} class is exist
* class when {@link org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties} class is exist
*/
public class DispatcherHandlerInstrumentation extends
org.apache.skywalking.apm.plugin.spring.webflux.v5.define.DispatcherHandlerInstrumentation {
@Override
protected String[] witnessClasses() {
return new String[]{"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"};
return new String[]{"org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties"};
}
}

View File

@ -20,13 +20,13 @@ package org.apache.skywalking.apm.plugin.spring.cloud.gateway.v3x.define;
/**
* This class is used for enable {@link org.apache.skywalking.apm.plugin.spring.webflux.v5.define.ServerWebExchangeInstrumentation}
* when {@link org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor} class is exist.
* when {@link org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties} class is exist.
*/
public class ServerWebExchangeInstrumentation extends
org.apache.skywalking.apm.plugin.spring.webflux.v5.define.ServerWebExchangeInstrumentation {
@Override
protected String[] witnessClasses() {
return new String[]{"org.springframework.cloud.gateway.config.GatewayEnvironmentPostProcessor"};
return new String[]{"org.springframework.cloud.gateway.config.GatewayLoadBalancerProperties"};
}
}