com.newrelic.weave.violation.MULTIPLE_WEAVE_ALL_METHODS.md Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of newrelic-weaver Show documentation
Show all versions of newrelic-weaver Show documentation
The Weaver of the Java agent.
## MULTIPLE_WEAVE_ALL_METHODS ##
###Description###
This violation was raised because the @Weave class contains multiple methods annotated with @WeaveIntoAllMethods.
###Example###
####Original Class####
```
public class Example {
public int getNumber();
public String getString();
}
```
####Bad####
```
@Weave
public class Example {
@WeaveIntoAllMethods
private static void instrumentation() {
// record count
};
@WeaveIntoAllMethods
private static void secondInstrumentation() {
// log
};
}
```
----------
####Good####
```
@Weave
public class Example {
@WeaveIntoAllMethods
private static void instrumentation() {
// record count
// log
};
}
```
© 2015 - 2024 Weber Informatics LLC | Privacy Policy