[#noissue] Update Service parameter for application creation#13420
[#noissue] Update Service parameter for application creation#13420emeroad merged 1 commit intopinpoint-apm:masterfrom
Conversation
|
There was a problem hiding this comment.
Pull request overview
This pull request refactors the Application creation mechanism across controllers and services by introducing a Service parameter to support multi-service scenarios. The changes consistently use Service.DEFAULT throughout all affected code paths, ensuring backward compatibility while laying the groundwork for future service-aware functionality.
Changes:
- Added
Serviceparameter to allApplicationFactory.createApplication()andcreateApplicationByTypeName()method calls across multiple controllers, consistently usingService.DEFAULT - Updated
ApdexStatServiceinterface and its implementation to accept aServiceparameter in method signatures - Modified the Spring
@Serviceannotation to use fully qualified name@org.springframework.stereotype.ServiceinDefaultApdexStatServiceto avoid naming conflict with the newly importedServiceclass
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ApdexScoreController.java | Updated all 7 Application creation calls to include Service.DEFAULT parameter |
| AdminController.java | Added Service parameter to helper method and updated both Application factory method calls with Service.DEFAULT |
| AgentsController.java | Updated single Application creation call to include Service.DEFAULT parameter |
| DefaultApdexStatService.java | Changed annotation to fully qualified name, updated interface implementation to accept and use Service parameter |
| ApdexStatService.java | Added Service parameter to both interface method signatures |
| ApplicationInspectorStatController.java | Updated ApdexStatService call to pass Service.DEFAULT |
| AgentInspectorStatController.java | Updated ApdexStatService call to pass Service.DEFAULT |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #13420 +/- ##
============================================
- Coverage 33.12% 33.11% -0.01%
Complexity 10984 10984
============================================
Files 4066 4066
Lines 94408 94408
Branches 9820 9820
============================================
- Hits 31269 31267 -2
- Misses 60451 60453 +2
Partials 2688 2688 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



This pull request updates the handling of
Applicationcreation across various controller and service classes by introducing and consistently using theServiceparameter, specificallyService.DEFAULT, in method calls. This change improves clarity and extensibility for multi-service scenarios. Additionally, interfaces and implementations are updated to reflect this new parameter, ensuring consistency throughout the codebase.Application creation and service parameterization
AgentsController,AdminController, andApdexScoreControllerto useService.DEFAULTwhen creatingApplicationinstances, ensuring a consistent approach to service identification. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]AdminControllerto accept aServiceparameter, updating their invocation and logic to support service-aware application creation.ApdexStatService interface and implementation changes
ApdexStatServiceinterface and its implementation (DefaultApdexStatService) to require aServiceparameter for both agent and application stat selection methods, propagating this change to all relevant method calls. [1] [2]Applicationobjects withinDefaultApdexStatServiceto utilize the new service-aware factory methods.Controller imports and annotations
Serviceimport statements to all affected controller and service files to support the new parameterization. [1] [2] [3] [4]DefaultApdexStatServiceclass to use the fully qualified name, improving clarity.Inspector controllers update
AgentInspectorStatControllerandApplicationInspectorStatControllerto passService.DEFAULTwhen requesting Apdex stats, aligning with the new service-aware interface. [1] [2]These changes collectively enhance the codebase's support for service-aware operations and lay the groundwork for future multi-service functionality.