Skip to content

Comments

[#noissue] Refactor Application handling to include Service#13414

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

[#noissue] Refactor Application handling to include Service#13414
emeroad merged 1 commit intopinpoint-apm:masterfrom
emeroad:#noissue-back

Conversation

@emeroad
Copy link
Member

@emeroad emeroad commented Feb 19, 2026

This pull request refactors the way Application objects are constructed throughout the codebase to consistently include a serviceUid (service unique identifier) parameter. This change impacts many areas, including application creation in controllers, DAOs, mappers, and utility classes. Additionally, dependencies are updated to support the new ApplicationFactory signature, and related code is adjusted for improved clarity and correctness.

Refactoring application creation to include serviceUid:

  • Updated all usages of ApplicationFactory.createApplication and direct Application constructors to include a serviceUid parameter, typically using ServiceUid.DEFAULT.getUid() or extracting it from relevant objects. This ensures that all Application instances are constructed with a unique service identifier, improving consistency and correctness across the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

  • Refactored the construction of Application objects in mappers and processors to extract serviceUid from row keys or use defaults as appropriate. [1] [2] [3]

Dependency and interface updates:

  • Modified ApplicationResponseTimeV3ResultExtractor and its usage to depend on ApplicationFactory instead of ServiceTypeRegistryService, reflecting the new construction pattern for Application objects. [1] [2] [3] [4]

Code clarity and correctness improvements:

  • Added missing imports and updated usages for Service and ServiceUid where necessary to support the new application creation signature. [1] [2] [3]
  • Fixed a minor bug in RowFilter by replacing .getName() with .getApplicationName() for correct property access.
  • Introduced a helper method getSpanApplication in FilteredMapBuilder for clarity and to centralize the new application creation logic. [1] [2]

These changes collectively ensure that the serviceUid is consistently handled throughout the application, laying the groundwork for improved identification and management of services.

@emeroad emeroad force-pushed the #noissue-back branch 2 times, most recently from 58591fd to 5abb5d0 Compare February 19, 2026 08:49
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 27.77778% with 65 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.11%. Comparing base (14d8258) to head (2a84725).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...thorization/controller/ResponseTimeController.java 0.00% 14 Missing ⚠️
...point/web/component/DefaultApplicationFactory.java 56.66% 12 Missing and 1 partial ⚠️
...licationmap/controller/MapHistogramController.java 0.00% 8 Missing ⚠️
...oint/web/applicationmap/dao/v3/InLinkV3Mapper.java 0.00% 7 Missing ⚠️
...int/web/agentlist/controller/AgentsController.java 0.00% 6 Missing ⚠️
...int/web/applicationmap/dao/v3/OutLinkV3Mapper.java 0.00% 4 Missing ⚠️
...o/v3/ApplicationResponseTimeV3ResultExtractor.java 0.00% 2 Missing ⚠️
...applicationmap/dao/v3/HostApplicationMapperV3.java 0.00% 2 Missing ⚠️
...vercorp/pinpoint/web/mapper/ApplicationMapper.java 0.00% 2 Missing ⚠️
...b/applicationmap/config/MapV3DaoConfiguration.java 0.00% 1 Missing ⚠️
... and 6 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13414      +/-   ##
============================================
+ Coverage     33.10%   33.11%   +0.01%     
- Complexity    10975    10983       +8     
============================================
  Files          4066     4066              
  Lines         94350    94387      +37     
  Branches       9817     9818       +1     
============================================
+ Hits          31232    31257      +25     
- Misses        60437    60445       +8     
- Partials       2681     2685       +4     

☔ 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.

@sonarqubecloud
Copy link

@emeroad emeroad merged commit 3b6112e into pinpoint-apm:master Feb 20, 2026
6 of 7 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