-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[ISSUE #8211] Add two metrics rocketmq_topic_create_execution_time and rocketmq_consumer_group_create_execution_time #8212
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8212 +/- ##
=============================================
- Coverage 42.94% 42.85% -0.10%
+ Complexity 10383 10371 -12
=============================================
Files 1270 1271 +1
Lines 88727 88775 +48
Branches 11407 11408 +1
=============================================
- Hits 38108 38047 -61
- Misses 45925 46023 +98
- Partials 4694 4705 +11 ☔ View full report in Codecov by Sentry. |
Attributes attributes = BrokerMetricsManager.newAttributesBuilder() | ||
.put(LABEL_REQUEST_IS_SUCCESS, response.getCode() == ResponseCode.SUCCESS) |
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.
If the code reaches this point, it appears that the request must have been successful. Because the failed request has already been returned in advance
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.
Yes, I overlooked the issue with the logical branches. The latest changes incorporate the metric recording logic into the finally block, ensuring it executes under all circumstances.
sync the upstream Signed-off-by: 黄梓淇 <me@U-0MV57FM9-2309.local>
Signed-off-by: 黄梓淇 <me@U-0MV57FM9-2309.local>
…ription_number Signed-off-by: 黄梓淇 <me@U-0MV57FM9-2309.local>
# Conflicts: # broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsConstant.java # broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java
Signed-off-by: 黄梓淇 <me@U-0MV57FM9-2309.local>
Signed-off-by: 黄梓淇 <me@U-0MV57FM9-2309.local>
Signed-off-by: 黄梓淇 <me@U-0MV57FM9-2309.local>
Which Issue(s) This PR Fixes
Fixes #8211
Brief Description
Add two metrics rocketmq_topic_create_execution_time and rocketmq_consumer_group_create_execution_time as following:
le_10_ms
le_100_ms
le_1_s
le_3_s
le_5_s
le_overflow
le_10_ms
le_100_ms
le_1_s
le_3_s
le_5_s
le_overflow
How Did You Test This Change?
Simplified Testing Strategy
metricsExporterType
within thebrokerConfig
toPROM
, which will export data in Prometheus format....
curl localhost:<export_port>
(default is5557
), then verify that the output metrics align with expectations.