-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[#10882] Add server map module based on redis-timeseries #11850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11850 +/- ##
============================================
- Coverage 33.59% 33.35% -0.24%
- Complexity 10617 10619 +2
============================================
Files 3870 3894 +24
Lines 91158 91848 +690
Branches 9620 9679 +59
============================================
+ Hits 30621 30635 +14
- Misses 57885 58557 +672
- Partials 2652 2656 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c69d6cc to
711c711
Compare
514e981 to
7c356a2
Compare
707675d to
a6c0db7
Compare
a6c0db7 to
2c89b2e
Compare
2c89b2e to
0e4043e
Compare
There was a problem hiding this 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 introduces a new server map module that leverages Redis Timeseries for recording and aggregating application map statistics. Key changes include:
- Addition of a new ApplicationMapModule along with corresponding Spring configuration to enable component scanning.
- New Redis-based implementations for bulk writing and DAO interfaces (InboundDao, OutboundDao, SelfDao) to support bidirectional statistics updating.
- Updates across multiple classes to build and manage time series keys and values for tracking application metrics.
Reviewed Changes
Copilot reviewed 75 out of 76 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/ApplicationMapModule.java | Introduces a new configuration module for the ApplicationMap feature. |
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/redis/schema/ApplicationMapTable.java | Defines table types for categorizing Redis time series data. |
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/redis/statistics/RedisBulkFactory.java | Creates RedisBulkWriter beans using a simple async Redis connection. |
| collector/src/main/java/com/navercorp/pinpoint/collector/applicationmap/redis/schema/TimeSeriesKey.java | Constructs composite keys for Redis time series storage. |
| Other files | Provide new DAO and service implementations across Redis self, inbound, and outbound operations, along with minor updates in BulkWriter and module registration. |
Files not reviewed (1)
- collector/pom.xml: Language not supported
| this.subServiceId = new LabelToKey(TimeSeriesLabel.SUB_SERVICE_ID, String.valueOf(subServiceId)); | ||
| this.subApplicationName = new LabelToKey(TimeSeriesLabel.SUB_APPLICATION_NAME, subApplicationName); | ||
| this.subServiceType = new LabelToKey(TimeSeriesLabel.SUB_SERVICE_TYPE_SLOT, String.valueOf(subServiceType)); | ||
| this.slotNumber = new LabelToKey(TimeSeriesLabel.SUB_SERVICE_TYPE_SLOT, String.valueOf(slotNumber)); |
Copilot
AI
Mar 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both subServiceType and slotNumber use the same TimeSeriesLabel.SUB_SERVICE_TYPE_SLOT, which may lead to key collisions or overwriting when converting to labels. Consider introducing a distinct label (e.g., SUB_SLOT_NUMBER) for slotNumber.
| this.slotNumber = new LabelToKey(TimeSeriesLabel.SUB_SERVICE_TYPE_SLOT, String.valueOf(slotNumber)); | |
| this.slotNumber = new LabelToKey(TimeSeriesLabel.SUB_SLOT_NUMBER, String.valueOf(slotNumber)); |
|
|
||
| private RedisBulkWriter newRedisBulkWriter() { | ||
| RedisURI redisURI = RedisURI.create("redis://localhost:6379"); | ||
| RedisClient client = RedisClient.create(redisURI); |
Copilot
AI
Mar 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new RedisClient is created without explicit lifecycle management or shutdown handling. Consider defining the client as a Spring bean with proper resource management to prevent potential resource leaks.
| private RedisBulkWriter newRedisBulkWriter() { | |
| RedisURI redisURI = RedisURI.create("redis://localhost:6379"); | |
| RedisClient client = RedisClient.create(redisURI); | |
| @Bean | |
| public RedisClient redisClient() { | |
| RedisURI redisURI = RedisURI.create("redis://localhost:6379"); | |
| return RedisClient.create(redisURI); | |
| } | |
| private RedisBulkWriter newRedisBulkWriter(RedisClient client) { |
0e4043e to
9c952e5
Compare
add selfDao resolve conflicts
9c952e5 to
e4214be
Compare
No description provided.