AgentBuilder agentBuilder = new AgentBuilder.Default()
.with(AgentBuilder.RedefinitionStrategy.RETRANSFORMATION) // Crucial for dynamic attach
.with(AgentBuilder.TypeStrategy.Default.REDEFINE) // Helps with existing classes
.type(ElementMatchers.anyOf(targetClasses)) // Matches your profiler_targets.txt
.transform((builder, typeDescription, classLoader, module) ->
builder.visit(Advice.to(MethodTimerAdvice.class).on(ElementMatchers.isMethod()))
);
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)