Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update witness class in springmvc-annotation-5.x-plugin #571

Merged
merged 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Release Notes.
* Implement new naming policies for names of auxiliary type, interceptor delegate field, renamed origin method, method
access name, method cache value field. All names are under `sw$` name trait. They are predictable and unchanged after
re-transform.
* Fix witness class in springmvc-annotation-5.x-plugin to avoid falling into v3 use cases.

```
* SWAuxiliaryTypeNamingStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;

public abstract class AbstractSpring5Instrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";

@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;

public abstract class AbstractSpring5ReactiveInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";

@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.v2.ClassInstanceMethodsEnhancePluginDefineV2;

public abstract class AbstractSpring5ReactiveInstrumentationV2 extends ClassInstanceMethodsEnhancePluginDefineV2 {
public static final String WITNESS_CLASSES = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_LOW_VERSION = "org.springframework.beans.annotation.AnnotationBeanUtils";
public static final String WITNESS_CLASSES_HIGH_VERSION = "org.springframework.core.ReactiveAdapterRegistry";

@Override
protected final String[] witnessClasses() {
return new String[] {WITNESS_CLASSES};
return new String[] {WITNESS_CLASSES_LOW_VERSION, WITNESS_CLASSES_HIGH_VERSION};
}
}