Skip to content

Add classLoaderOptimization matcher#17226

Merged
trask merged 1 commit intoopen-telemetry:mainfrom
laurit:spring-rmi-opt
Mar 30, 2026
Merged

Add classLoaderOptimization matcher#17226
trask merged 1 commit intoopen-telemetry:mainfrom
laurit:spring-rmi-opt

Conversation

@laurit
Copy link
Copy Markdown
Contributor

@laurit laurit commented Mar 30, 2026

Our convention is to add classLoaderOptimization when a complex matcher, such as extendsClass, is used.

@laurit laurit requested a review from a team as a code owner March 30, 2026 12:25

@Override
public ElementMatcher<ClassLoader> classLoaderOptimization() {
return hasClassesNamed("org.springframework.ejb.access.AbstractSlsbInvokerInterceptor");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there any particular reason to use this class for matching ? If yes then maybe a comment would be relevant.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because it is used in extendsClass(named("org.springframework.ejb.access.AbstractSlsbInvokerInterceptor")). The intent for classLoaderOptimization matchers is to allow skipping running potentially expensive matchers when the framework classes they match are not present.

@trask trask merged commit a81f45e into open-telemetry:main Mar 30, 2026
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants