[#noissue] Dump the full application map model when debug logging is enabled - #14152
Open
emeroad wants to merge 2 commits into
Open
[#noissue] Dump the full application map model when debug logging is enabled#14152emeroad wants to merge 2 commits into
emeroad wants to merge 2 commits into
Conversation
|
There was a problem hiding this comment.
Pull request overview
This pull request refactors the collector’s application map write path to better distinguish empty vs non-empty ApplicationMapModel instances, improves debug dump readability, and makes ApplicationMapBuilder injectable for cleaner construction and testing.
Changes:
- Replaces
ApplicationMapModel.isEmpty()withhasRows()(inverted semantics) and updates call sites/tests. - Enhances
ApplicationMapModel.dump()to emit an indented multi-line format and omit empty lists. - Refactors
HbaseApplicationMapService/ApplicationMapModuleto injectApplicationMapBuilderinstead of constructing it internally, and skips write/log work for empty models.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| collector/src/test/java/com/navercorp/pinpoint/collector/applicationmap/model/ApplicationMapBuilderTest.java | Updates expectations to use hasRows() for empty model assertions. |
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/service/HbaseApplicationMapService.java | Injects ApplicationMapBuilder and gates debug logging + persistence operations on model.hasRows(). |
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/model/ApplicationMapModel.java | Introduces hasRows() and upgrades dump() output formatting/verbosity for debugging. |
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/config/ApplicationMapModule.java | Adds an ApplicationMapBuilder bean and wires it into HbaseApplicationMapService. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request refactors the application map building and writing logic to improve clarity and efficiency in the Pinpoint collector. The changes focus on replacing the
isEmpty()method with a more intuitivehasRows()method, enhancing thedump()output for debugging, and updating dependency injection forApplicationMapBuilder. These updates help ensure that only non-empty models are processed and logged, and improve code maintainability.Refactoring and API improvements:
isEmpty()withhasRows()inApplicationMapModel, inverting the logic to clarify when the model contains data. All usages and tests have been updated accordingly. [1] [2]dump()method inApplicationMapModelto produce a more readable, indented, multi-line output, and omit empty lists for easier debugging.Dependency injection and service construction:
ApplicationMapModuleandHbaseApplicationMapServiceto inject anApplicationMapBuilderinstance directly, rather than constructing it internally, improving testability and separation of concerns. [1] [2] [3] [4]Behavioral changes:
write()method inHbaseApplicationMapServiceto only log and process models that have rows, preventing unnecessary operations on empty models. [1] [2]