Skip to content

Conversation

@emeroad
Copy link
Member

@emeroad emeroad commented Jan 20, 2026

…d implementation

This pull request refactors the usage of the TagUtils utility class throughout the codebase, moving references from the old location in com.navercorp.pinpoint.metric.common.model to the new location in com.navercorp.pinpoint.metric.common.util. It also marks the old class as deprecated and introduces a new implementation for the defaultTags method. Related test files are updated and relocated accordingly.

Refactoring and Deprecation

  • Updated all imports to use com.navercorp.pinpoint.metric.common.util.TagUtils instead of the deprecated com.navercorp.pinpoint.metric.common.model.TagUtils across multiple files, including Field.java in both the inspector and metric modules, and DefaultApdexStatService.java. [1] [2] [3]
  • Marked the old TagUtils class in com.navercorp.pinpoint.metric.common.model as deprecated, and its defaultTags method now delegates to the new utility class.

Utility Method Enhancement

  • Added a new defaultTags method to com.navercorp.pinpoint.metric.common.util.TagUtils to return an empty list if the input is null, replacing the previous implementation.

Test File Relocation

  • Renamed and updated the test file for TagUtils, moving it from the model package to the util package to match the new location of the class.

@emeroad emeroad added this to the 3.1.0 milestone Jan 20, 2026
@emeroad emeroad requested a review from Copilot January 20, 2026 05:45
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 PR refactors the TagUtils utility class by moving it from the model package to the util package and deprecating the old implementation. The old class now delegates to the new implementation to maintain backward compatibility during the transition period.

Changes:

  • Added defaultTags method to com.navercorp.pinpoint.metric.common.util.TagUtils to handle null tag lists
  • Deprecated com.navercorp.pinpoint.metric.common.model.TagUtils with delegation to the new class
  • Updated all import statements across the codebase to reference the new utility location

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
metric-module/metric/src/main/java/com/navercorp/pinpoint/metric/web/mapping/Field.java Updated import to use new TagUtils location
metric-module/metric-commons/src/test/java/com/navercorp/pinpoint/metric/common/util/TagUtilsTest.java Relocated test file to util package and updated imports
metric-module/metric-commons/src/main/java/com/navercorp/pinpoint/metric/common/util/TagUtils.java Added defaultTags method to return empty list for null input
metric-module/metric-commons/src/main/java/com/navercorp/pinpoint/metric/common/model/TagUtils.java Deprecated class with delegation to new util package implementation
inspector-module/inspector-web/src/main/java/com/navercorp/pinpoint/inspector/web/service/DefaultApdexStatService.java Updated import to use new TagUtils location
inspector-module/inspector-web/src/main/java/com/navercorp/pinpoint/inspector/web/definition/metric/field/Field.java Updated import to use new TagUtils location

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.24%. Comparing base (db9cc6f) to head (143db5e).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...avercorp/pinpoint/metric/common/util/TagUtils.java 0.00% 3 Missing ⚠️
...vercorp/pinpoint/metric/common/model/TagUtils.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13310      +/-   ##
============================================
- Coverage     33.25%   33.24%   -0.02%     
+ Complexity    10983    10979       -4     
============================================
  Files          4070     4070              
  Lines         94448    94449       +1     
  Branches       9834     9834              
============================================
- Hits          31411    31398      -13     
- Misses        60364    60374      +10     
- Partials       2673     2677       +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.

@emeroad emeroad merged commit 634c4cc into pinpoint-apm:master Jan 20, 2026
8 of 11 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