Skip to content

Comments

[#noissue] Update Service parameter for application creation#13420

Merged
emeroad merged 1 commit intopinpoint-apm:masterfrom
emeroad:#noissue-back
Feb 20, 2026
Merged

[#noissue] Update Service parameter for application creation#13420
emeroad merged 1 commit intopinpoint-apm:masterfrom
emeroad:#noissue-back

Conversation

@emeroad
Copy link
Member

@emeroad emeroad commented Feb 20, 2026

This pull request updates the handling of Application creation across various controller and service classes by introducing and consistently using the Service parameter, specifically Service.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

  • Updated all controller methods in AgentsController, AdminController, and ApdexScoreController to use Service.DEFAULT when creating Application instances, ensuring a consistent approach to service identification. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
  • Refactored private helper methods in AdminController to accept a Service parameter, updating their invocation and logic to support service-aware application creation.

ApdexStatService interface and implementation changes

  • Modified the ApdexStatService interface and its implementation (DefaultApdexStatService) to require a Service parameter for both agent and application stat selection methods, propagating this change to all relevant method calls. [1] [2]
  • Updated the construction of Application objects within DefaultApdexStatService to utilize the new service-aware factory methods.

Controller imports and annotations

  • Added Service import statements to all affected controller and service files to support the new parameterization. [1] [2] [3] [4]
  • Updated the annotation usage for the DefaultApdexStatService class to use the fully qualified name, improving clarity.

Inspector controllers update

  • Updated AgentInspectorStatController and ApplicationInspectorStatController to pass Service.DEFAULT when 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.

@sonarqubecloud
Copy link

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Service parameter to all ApplicationFactory.createApplication() and createApplicationByTypeName() method calls across multiple controllers, consistently using Service.DEFAULT
  • Updated ApdexStatService interface and its implementation to accept a Service parameter in method signatures
  • Modified the Spring @Service annotation to use fully qualified name @org.springframework.stereotype.Service in DefaultApdexStatService to avoid naming conflict with the newly imported Service class

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
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.11%. Comparing base (86f5d98) to head (41e38d4).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../pinpoint/web/controller/ApdexScoreController.java 0.00% 7 Missing ⚠️
.../web/authorization/controller/AdminController.java 0.00% 4 Missing ⚠️
...inspector/web/service/DefaultApdexStatService.java 0.00% 2 Missing ⚠️
...r/web/controller/AgentInspectorStatController.java 0.00% 1 Missing ⚠️
...controller/ApplicationInspectorStatController.java 0.00% 1 Missing ⚠️
...int/web/agentlist/controller/AgentsController.java 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@emeroad emeroad merged commit 362da97 into pinpoint-apm:master Feb 20, 2026
9 of 12 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.

1 participant