Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public abstract class AbstractSpringTransactionNameInstrumentation extends Elast
*/
@Override
public ElementMatcher<? super TypeDescription> getTypeMatcher() {
return nameStartsWith("org.springframework.web.servlet")
.and(hasSuperType(named("org.springframework.web.servlet.HandlerAdapter")))
return hasSuperType(named("org.springframework.web.servlet.HandlerAdapter"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing that will make the matching expensive as all potential instrumentation candidates will need to have all their super type chain resolved. We could however maybe use getTypeMatcherPreFilter to keep an heuristic on name while not impacting performance too much.

The total matching time is shown in agent debug logs when the agent stops, so that helps to give an idea about the efficiency of the heuristic.

.and(not(isInterface()));
}

Expand Down
Loading