allocation-instrumenter
allocation-instrumenter copied to clipboard
Filter/limit instrumentation by package or class name?
Is there an option to limit instrumentation by package/class name (incl. wildcard)? Or to exclude packages which cause problems? Our program does not start if we use Google Guice and Eureka Discovery Client together.
1) Error injecting constructor, java.lang.RuntimeException: Failed to initialize DiscoveryClient!
at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:299)
at com.netflix.discovery.DiscoveryClient.class(DiscoveryClient.java:111)
while locating com.netflix.discovery.DiscoveryClient
The only difference is the instrumenter JAR added as agent option to java:
-javaagent:/testdir/java-allocation-instrumenter-3.2.0.jar
Not right now. If you are building from source, it's pretty easy to hardcode, see:
https://github.com/google/allocation-instrumenter/blob/master/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationInstrumenter.java#L48
Otherwise, pull requests (with tests) probably acceptable. IIRC we haven't tried to accept anything in this project, but there's a first time for everything, right?