Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First shot at integrating mp-metrics. #3

Merged
merged 4 commits into from
Jul 31, 2018
Merged

First shot at integrating mp-metrics. #3

merged 4 commits into from
Jul 31, 2018

Conversation

bobmcwhirter
Copy link
Contributor

No clue if the interceptors are intercepting.

No clue if the interceptors are intercepting.
metrics.createRegistries();
}

try (BytecodeRecorder recorder = processorContext.addDeploymentTask(RuntimePriority.WELD_DEPLOYMENT + 30 ) ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dunno, could this be moved to static instead of deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like the answer is "yes"

@@ -63,6 +63,10 @@ public void addClass(SeContainerInitializer initializer, Class<?> clazz) {
initializer.addBeanClasses(clazz);
}

public void addInterceptor(SeContainerInitializer initialize, Class<?> interceptorClass) {
initialize.enableInterceptors(interceptorClass);
Copy link
Contributor

Choose a reason for hiding this comment

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

SeContainerInitializer.enableInterceptors() only enables the interceptors for the synthetic bean archive. MetricsInterceptor and friends are enabled globally (for the application) using @Priority - so there's no need to enable them locally. In fact, this enablement is just ignored.

@mkouba
Copy link
Contributor

mkouba commented Jul 31, 2018

Hm, so because the discovery is disabled completely the smallrye extension is not used and you're trying to simulate the functionality, right?

Of course, you could use SeContainerInitializer.addExtensions() to register the smallrye extension manually and save quite a few lines but this would prevent us from switching to build-time resolution (arc)...

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.

4 participants