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

Plugin metrics injection #5372

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

san81
Copy link
Collaborator

@san81 san81 commented Jan 30, 2025

Description

Making the PluginMetrics as an injectable bean so that we can simply inject this bean in any other spring bean.
Also, clean up some unused variables in Jira source.
Fixed a flaky test in Otel trace processor

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

san81 added 3 commits January 29, 2025 18:06
Signed-off-by: Santhosh Gandhe <[email protected]>
Signed-off-by: Santhosh Gandhe <[email protected]>
Signed-off-by: Santhosh Gandhe <[email protected]>
beanFactory.registerSingleton(configuration.getClass().getName(), configuration);
}
if (pluginSetting != null) {
Copy link
Member

Choose a reason for hiding this comment

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

Would this change allow us to remove the following line without breaking existing code?

typedArgumentsSuppliers.put(PluginMetrics.class, () -> PluginMetrics.fromPluginSetting(builder.pluginSetting));

Also, at a high-level, can we consolidate these completely?

*/
public BeanFactory createPluginSpecificContext(Class[] markersToScan, Object configuration) {
public BeanFactory createPluginSpecificContext(Class[] markersToScan, Object configuration, final PluginSetting pluginSetting) {
Copy link
Member

Choose a reason for hiding this comment

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

This change resulted in a lot of other changes. This indicates that we should have a class to handle these parameters. We actually already have something similar in the ComponentPluginArgumentsContext. I think consolidating this will help clean up the code. See my other comment below.

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.

2 participants